ohai 15.8.0 → 15.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ohai/plugins/linux/virtualization.rb +2 -2
- data/lib/ohai/plugins/shard.rb +11 -1
- data/lib/ohai/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cdfdd4fa36bb2e7c4a6b62a5cbcce4627e99a09ed3830e664edafb6a5bc8f471
|
4
|
+
data.tar.gz: 7f0c42d9cae6beedf8ab08e982d68aca51c5250523ced1dfceaa0633dc532fae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4deda99a74a2bb7187d14c3d74068776e4853387d871f6ea0f12ab70f4ef60ef2f8be0286025349c83ff590910d46fe82d03d17a66f0a273605ee97777cd3d96
|
7
|
+
data.tar.gz: 1ae3e4ac9c24b84d9504d66c18b47826b3b58804d2096fda5e41ed4e92676c9a5cc15a005e167d49307cfabff53bef7f3978f2cc64dc7a020ba1be39e299e538
|
@@ -118,8 +118,8 @@ Ohai.plugin(:Virtualization) do
|
|
118
118
|
|
119
119
|
# parse dmi to discover various virtualization guests
|
120
120
|
# we do this *after* the kvm detection so that OpenStack isn't detected as KVM
|
121
|
-
logger.trace("Looking up DMI data manufacturer: '#{get_attribute(:dmi, :system, :manufacturer)}'
|
122
|
-
guest = guest_from_dmi_data(get_attribute(:dmi, :system, :manufacturer), get_attribute(:dmi, :system, :
|
121
|
+
logger.trace("Looking up DMI data manufacturer: '#{get_attribute(:dmi, :system, :manufacturer)}' product_name: '#{get_attribute(:dmi, :system, :product_name)}' version: '#{get_attribute(:dmi, :system, :version)}'")
|
122
|
+
guest = guest_from_dmi_data(get_attribute(:dmi, :system, :manufacturer), get_attribute(:dmi, :system, :product_name), get_attribute(:dmi, :system, :version))
|
123
123
|
if guest
|
124
124
|
logger.trace("Plugin Virtualization: DMI data indicates #{guest} guest")
|
125
125
|
virtualization[:system] = guest
|
data/lib/ohai/plugins/shard.rb
CHANGED
@@ -22,10 +22,12 @@ Ohai.plugin(:ShardSeed) do
|
|
22
22
|
|
23
23
|
def get_dmi_property(dmi, thing)
|
24
24
|
%w{system base_board chassis}.each do |section|
|
25
|
-
|
25
|
+
if dmi[section] && dmi[section][thing] && !dmi[section][thing].strip.empty?
|
26
26
|
return dmi[section][thing]
|
27
27
|
end
|
28
28
|
end
|
29
|
+
Ohai::Log.error("shard_seed: Failed to get dmi property #{thing}: is dmidecode installed?")
|
30
|
+
raise "Failed to generate shard_seed"
|
29
31
|
end
|
30
32
|
|
31
33
|
def default_sources
|
@@ -77,11 +79,16 @@ Ohai.plugin(:ShardSeed) do
|
|
77
79
|
yield(src)
|
78
80
|
end
|
79
81
|
end
|
82
|
+
if data.empty?
|
83
|
+
Ohai::Log.error("shard_seed: Unable to generate seed! Either ensure 'dmidecode' is installed, or use 'Ohai.config[:plugin][:shard_seed][:sources]' to set different sources.")
|
84
|
+
raise "Failed to generate shard_seed"
|
85
|
+
end
|
80
86
|
shard_seed digest_algorithm.hexdigest(data)[0...7].to_i(16)
|
81
87
|
end
|
82
88
|
|
83
89
|
collect_data do
|
84
90
|
create_seed do |src|
|
91
|
+
Ohai::Log.error("shard_seed: No such source #{src}")
|
85
92
|
raise "No such shard_seed source: #{src}"
|
86
93
|
end
|
87
94
|
end
|
@@ -99,6 +106,7 @@ Ohai.plugin(:ShardSeed) do
|
|
99
106
|
when :uuid
|
100
107
|
wmi.first_of("Win32_ComputerSystemProduct")["UUID"]
|
101
108
|
else
|
109
|
+
Ohai::Log.error("shard_seed: No such source #{src}")
|
102
110
|
raise "No such shard_seed source: #{src}"
|
103
111
|
end
|
104
112
|
end
|
@@ -112,6 +120,7 @@ Ohai.plugin(:ShardSeed) do
|
|
112
120
|
when :uuid
|
113
121
|
hardware["platform_UUID"]
|
114
122
|
else
|
123
|
+
Ohai::Log.error("shard_seed: No such source #{src}")
|
115
124
|
raise "No such shard_seed source: #{src}"
|
116
125
|
end
|
117
126
|
end
|
@@ -125,6 +134,7 @@ Ohai.plugin(:ShardSeed) do
|
|
125
134
|
when :uuid
|
126
135
|
get_dmi_property(dmi, :uuid)
|
127
136
|
else
|
137
|
+
Ohai::Log.error("shard_seed: No such source #{src}")
|
128
138
|
raise "No such shard_seed source: #{src}"
|
129
139
|
end
|
130
140
|
end
|
data/lib/ohai/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ohai
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 15.
|
4
|
+
version: 15.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Jacob
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-04-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: systemu
|