ohai 16.3.0 → 16.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/ohai +0 -2
- data/lib/ohai/mixin/dmi_decode.rb +1 -1
- data/lib/ohai/plugins/aix/memory.rb +3 -3
- data/lib/ohai/plugins/c.rb +2 -2
- data/lib/ohai/plugins/filesystem.rb +4 -4
- data/lib/ohai/plugins/hostname.rb +10 -10
- data/lib/ohai/plugins/vmware.rb +1 -1
- data/lib/ohai/plugins/windows/network.rb +1 -1
- data/lib/ohai/plugins/windows/platform.rb +1 -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: 7be1477adf0e463ac6149e5e3bb02ea983b8ea39197a84baf414472071b9f829
|
4
|
+
data.tar.gz: a928b3b5b11a6230bed0a235cd06210c1d98c1c08f347d85390270d02123cdd5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4033840091985804ad19aab09e79c516e2811149f4165d3b904cb497743e552757bf32b0d32f574c2451866f8267bf451c12f8f993677b509c7ab71d0446c9dd
|
7
|
+
data.tar.gz: 4b889129b7d4838410f936182615ef4b071ca4edd53fbfd8a374a349f39d6a2e6e842499167fd39aa5ae38b5bd7ebf2d64d25b6564c5fbf8dbbc4b16b40d91c3
|
data/bin/ohai
CHANGED
@@ -40,7 +40,7 @@ module ::Ohai::Mixin::DmiDecode
|
|
40
40
|
case product
|
41
41
|
when /VirtualBox/
|
42
42
|
return "vbox"
|
43
|
-
when /OpenStack/ # yes this is here twice. Product catches
|
43
|
+
when /OpenStack/ # yes this is here twice. Product catches Red Hat's version
|
44
44
|
return "openstack"
|
45
45
|
when /(KVM|RHEV)/
|
46
46
|
return "kvm"
|
@@ -29,8 +29,8 @@ Ohai.plugin(:Memory) do
|
|
29
29
|
memory[:total] = "#{total_in_mb.to_i * 1024}kB"
|
30
30
|
memory[:free] = "#{free_in_mb.to_i * 1024}kB"
|
31
31
|
|
32
|
-
|
33
|
-
memory[:swap]["total"] = "#{(
|
34
|
-
memory[:swap]["free"] = "#{(
|
32
|
+
swap_info = shell_out("swap -s").stdout.split # returns swap info in 4K blocks
|
33
|
+
memory[:swap]["total"] = "#{(swap_info[2].to_i) * 4}kB"
|
34
|
+
memory[:swap]["free"] = "#{(swap_info[10].to_i) * 4}kB"
|
35
35
|
end
|
36
36
|
end
|
data/lib/ohai/plugins/c.rb
CHANGED
@@ -137,7 +137,7 @@ Ohai.plugin(:C) do
|
|
137
137
|
logger.trace("Plugin C: 'xlc' binary could not be found. Skipping data.")
|
138
138
|
end
|
139
139
|
|
140
|
-
def
|
140
|
+
def collect_sun_pro
|
141
141
|
# sun pro
|
142
142
|
collect("cc -V -flags") do |so|
|
143
143
|
output = so.stderr.split
|
@@ -173,7 +173,7 @@ Ohai.plugin(:C) do
|
|
173
173
|
@c = Mash.new
|
174
174
|
collect_gcc
|
175
175
|
collect_glibc
|
176
|
-
|
176
|
+
collect_sun_pro
|
177
177
|
languages[:c] = @c unless @c.empty?
|
178
178
|
end
|
179
179
|
end
|
@@ -590,16 +590,16 @@ Ohai.plugin(:Filesystem) do
|
|
590
590
|
end
|
591
591
|
end
|
592
592
|
|
593
|
-
zfs.each do |
|
593
|
+
zfs.each do |fs_name, attributes|
|
594
594
|
mountpoint = attributes[:mountpoint][:value] if attributes[:mountpoint]
|
595
|
-
key = "#{
|
595
|
+
key = "#{fs_name},#{mountpoint}"
|
596
596
|
fs[key] ||= Mash.new
|
597
597
|
fs[key][:fs_type] = "zfs"
|
598
598
|
fs[key][:mount] = mountpoint if mountpoint
|
599
|
-
fs[key][:device] =
|
599
|
+
fs[key][:device] = fs_name
|
600
600
|
fs[key][:zfs_properties] = attributes
|
601
601
|
# find all zfs parents
|
602
|
-
parents =
|
602
|
+
parents = fs_name.split("/")
|
603
603
|
zfs_parents = []
|
604
604
|
(0..parents.length - 1).to_a.each do |parent_index|
|
605
605
|
next_parent = parents[0..parent_index].join("/")
|
@@ -99,19 +99,19 @@ Ohai.plugin(:Hostname) do
|
|
99
99
|
hostname from_cmd("hostname -s")
|
100
100
|
machinename from_cmd("hostname")
|
101
101
|
begin
|
102
|
-
|
102
|
+
our_fqdn = resolve_fqdn
|
103
103
|
# Sometimes... very rarely, but sometimes, 'hostname --fqdn' falsely
|
104
104
|
# returns a blank string. WTF.
|
105
|
-
if
|
105
|
+
if our_fqdn.nil? || our_fqdn.empty?
|
106
106
|
logger.trace("Plugin Hostname: hostname returned an empty string, retrying once.")
|
107
|
-
|
107
|
+
our_fqdn = resolve_fqdn
|
108
108
|
end
|
109
109
|
|
110
|
-
if
|
110
|
+
if our_fqdn.nil? || our_fqdn.empty?
|
111
111
|
logger.trace("Plugin Hostname: hostname returned an empty string twice and will" +
|
112
112
|
"not be set.")
|
113
113
|
else
|
114
|
-
fqdn
|
114
|
+
fqdn our_fqdn
|
115
115
|
end
|
116
116
|
rescue
|
117
117
|
logger.trace(
|
@@ -132,20 +132,20 @@ Ohai.plugin(:Hostname) do
|
|
132
132
|
hostname from_cmd("hostname -s")
|
133
133
|
machinename from_cmd("hostname")
|
134
134
|
begin
|
135
|
-
|
135
|
+
our_fqdn = from_cmd("hostname --fqdn")
|
136
136
|
# Sometimes... very rarely, but sometimes, 'hostname --fqdn' falsely
|
137
137
|
# returns a blank string. WTF.
|
138
|
-
if
|
138
|
+
if our_fqdn.nil? || our_fqdn.empty?
|
139
139
|
logger.trace("Plugin Hostname: hostname --fqdn returned an empty string, retrying " +
|
140
140
|
"once.")
|
141
|
-
|
141
|
+
our_fqdn = from_cmd("hostname --fqdn")
|
142
142
|
end
|
143
143
|
|
144
|
-
if
|
144
|
+
if our_fqdn.nil? || our_fqdn.empty?
|
145
145
|
logger.trace("Plugin Hostname: hostname --fqdn returned an empty string twice and " +
|
146
146
|
"will not be set.")
|
147
147
|
else
|
148
|
-
fqdn
|
148
|
+
fqdn our_fqdn
|
149
149
|
end
|
150
150
|
rescue
|
151
151
|
logger.trace("Plugin Hostname: hostname --fqdn returned an error, probably no domain set")
|
data/lib/ohai/plugins/vmware.rb
CHANGED
@@ -56,7 +56,7 @@ Ohai.plugin(:VMware) do
|
|
56
56
|
end
|
57
57
|
end
|
58
58
|
# vmware-toolbox-cmd <param> status commands
|
59
|
-
# Iterate through each parameter supported by the "
|
59
|
+
# Iterate through each parameter supported by the "vmware-toolbox-cmd status" command, assign value
|
60
60
|
# to attribute "vmware[:<parameter>]"
|
61
61
|
%w{upgrade timesync}.each do |param|
|
62
62
|
vmware[param] = from_cmd("#{vmtools_path} #{param} status")
|
@@ -93,7 +93,7 @@ Ohai.plugin(:Network) do
|
|
93
93
|
|
94
94
|
# Selects default interface and returns its information
|
95
95
|
#
|
96
|
-
# @note Interface with least metric value should be
|
96
|
+
# @note Interface with least metric value should be preferred as default_route
|
97
97
|
#
|
98
98
|
# @param configuration [Mash] Configuration of interfaces as iface_config
|
99
99
|
# [<interface_index> => {<interface_configurations>}]
|
@@ -16,7 +16,7 @@
|
|
16
16
|
# limitations under the License.
|
17
17
|
#
|
18
18
|
|
19
|
-
# After long discussion in IRC the "powers that be" have come to a
|
19
|
+
# After long discussion in IRC the "powers that be" have come to a consensus
|
20
20
|
# that there is no other Windows platforms exist that were not based on the
|
21
21
|
# Windows_NT kernel, so we herby decree that "windows" will refer to all
|
22
22
|
# platforms built upon the Windows_NT kernel and have access to win32 or win64
|
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: 16.3.
|
4
|
+
version: 16.3.2
|
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-07-
|
11
|
+
date: 2020-07-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: systemu
|