manageiq-smartstate 0.9.0 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.codeclimate.yml +1 -1
- data/.github/workflows/ci.yaml +1 -1
- data/.whitesource +1 -1
- data/lib/MiqVm/MiqRhevmVm.rb +23 -3
- data/lib/manageiq/smartstate/version.rb +1 -1
- data/renovate.json +6 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d28b6b5963e7251ee987bba32b6136a49cff81afe1fbb5f6129661d3ee9ee129
|
4
|
+
data.tar.gz: df79d4b387ac5ba5738e9886f49f461fb77d4c80f6e36b310b36e2fc61adc77e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8823628b1fb83a33b03dac60e53567e2228bb1da257d091d8914441aa88835ef43f77314f5954231efe434c7ee059a0484d34e2c6d2346e62c59fbcaf4e91251
|
7
|
+
data.tar.gz: ceeb25ce2aea2280f71e1d53debe1bf493e8e3fb50de18a070585c4668d301c5292814cf759dbb1c834f202ab650b304a6a3ffba3b795b9ee12c0cb33338757b
|
data/.codeclimate.yml
CHANGED
data/.github/workflows/ci.yaml
CHANGED
data/.whitesource
CHANGED
data/lib/MiqVm/MiqRhevmVm.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'awesome_spawn'
|
1
2
|
require 'MiqVm/MiqVm'
|
2
3
|
|
3
4
|
class MiqRhevmVm < MiqVm
|
@@ -51,12 +52,17 @@ class MiqRhevmVm < MiqVm
|
|
51
52
|
storage_obj = storage_domains_by_id[storage_id]
|
52
53
|
|
53
54
|
file_path = file_path_for_storage_type(storage_obj, disk)
|
55
|
+
file_path_s = file_path.to_s
|
54
56
|
|
55
57
|
tag = "scsi0:#{idx}"
|
56
58
|
cfg_hash["#{tag}.present"] = "true"
|
57
59
|
cfg_hash["#{tag}.devicetype"] = "disk"
|
58
|
-
cfg_hash["#{tag}.filename"] =
|
60
|
+
cfg_hash["#{tag}.filename"] = file_path_s
|
59
61
|
cfg_hash["#{tag}.format"] = disk.format
|
62
|
+
|
63
|
+
if storage_type_block?(storage_obj.storage.type) && !lv_active?(file_path_s)
|
64
|
+
AwesomeSpawn.run!("sudo lvchange", :params => [:activate, "y", file_path_s])
|
65
|
+
end
|
60
66
|
end
|
61
67
|
cfg_hash
|
62
68
|
end
|
@@ -65,8 +71,7 @@ class MiqRhevmVm < MiqVm
|
|
65
71
|
storage_type = storage_obj&.storage&.type
|
66
72
|
|
67
73
|
# TODO: account for other storage types here.
|
68
|
-
|
69
|
-
when "nfs", "glusterfs"
|
74
|
+
if storage_type_file?(storage_type)
|
70
75
|
add_fs_mount(storage_obj)
|
71
76
|
fs_file_path(storage_obj, disk)
|
72
77
|
else
|
@@ -177,4 +182,19 @@ class MiqRhevmVm < MiqVm
|
|
177
182
|
$log.warn "#{log_header} Failed to unmount all items from <#{nfs_mount_root}>. Reason: <#{$!}>"
|
178
183
|
end
|
179
184
|
end
|
185
|
+
|
186
|
+
private
|
187
|
+
|
188
|
+
# Output attributes of LV in column format and parse to retrieve active status
|
189
|
+
def lv_active?(lv_path)
|
190
|
+
AwesomeSpawn.run!("sudo lvs", :params => [:noheadings, :o, "lv_active", lv_path]).output.strip == "active"
|
191
|
+
end
|
192
|
+
|
193
|
+
def storage_type_block?(storage_type)
|
194
|
+
["ISCSI", "FCP"].include?(storage_type.upcase)
|
195
|
+
end
|
196
|
+
|
197
|
+
def storage_type_file?(storage_type)
|
198
|
+
["NFS", "GLUSTERFS"].include?(storage_type.upcase)
|
199
|
+
end
|
180
200
|
end
|
data/renovate.json
ADDED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: manageiq-smartstate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ManageIQ Developers
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -574,6 +574,7 @@ files:
|
|
574
574
|
- lib/tasks/azure.rake
|
575
575
|
- log/.gitkeep
|
576
576
|
- manageiq-smartstate.gemspec
|
577
|
+
- renovate.json
|
577
578
|
homepage: https://github.com/ManageIQ/manageiq-smartstate
|
578
579
|
licenses:
|
579
580
|
- Apache-2.0
|