ohai 16.2.1 → 16.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: caa70e908138b3a05e5936f250179ad6eb43720978cc1c4296011df3d9da7478
|
|
4
|
+
data.tar.gz: 91020ca991c49f7e029604403bf4421be6f608fc5330bf787eae09b3dd6cb844
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e4204d5dadf0987967638c08e61124c5226810a07c83b200a4b7713c4736ce97f9bf229210fa19c06ab09d8aa4363b0389192598710d75d1b92ab055c473401d
|
|
7
|
+
data.tar.gz: 3f1620eb9f6fc44f2fc3f81e974be7d69762d7a783a010b30b415fd6365db4584daa57e42d985055551aeac94bf540986f6a6e5419b22a2ea4118fc1a0a0b03b
|
|
@@ -30,7 +30,7 @@ Ohai.plugin(:Uptime) do
|
|
|
30
30
|
so = shell_out("LC_ALL=POSIX ps -o etime= -p 1").stdout.strip
|
|
31
31
|
|
|
32
32
|
# Here we'll check our shell_out for a dash, which indicates there is a # of days involved
|
|
33
|
-
# We'll chunk off the days, hours (where applicable), minutes, seconds into
|
|
33
|
+
# We'll chunk off the days, hours (where applicable), minutes, seconds into separate vars
|
|
34
34
|
# We also need to do this because ps -o etime= will not display days if the machine has been up for less than 24 hours
|
|
35
35
|
# If the machine has been up for less than one hour, the shell_out will not output hours hence our else
|
|
36
36
|
# see here: https://www.ibm.com/support/knowledgecenter/en/ssw_aix_72/com.ibm.aix.cmds4/ps.htm#ps__row-d3e109655
|
|
@@ -105,7 +105,7 @@ Ohai.plugin(:Mdadm) do
|
|
|
105
105
|
# gather detailed information on the array
|
|
106
106
|
so = shell_out("mdadm --detail /dev/#{device}")
|
|
107
107
|
|
|
108
|
-
# if the mdadm command was
|
|
108
|
+
# if the mdadm command was successful pass so.stdout to create_raid_device_mash to grab the tidbits we want
|
|
109
109
|
mdadm[device] = create_raid_device_mash(so.stdout) if so.stdout
|
|
110
110
|
mdadm[device]["members"] = devices[device]["active"]
|
|
111
111
|
mdadm[device]["spares"] = devices[device]["spare"]
|
|
@@ -108,6 +108,8 @@ Ohai.plugin(:Network) do
|
|
|
108
108
|
# http://rubular.com/r/pwTNp65VFf
|
|
109
109
|
route_entry[k] = $1 if route_ending =~ /\b#{k}\s+([^\s]+)/
|
|
110
110
|
end
|
|
111
|
+
# https://rubular.com/r/k1sMrRn5yLjgVi
|
|
112
|
+
route_entry["via"] = $1 if route_ending =~ /\bvia\s+inet6\s+([^\s]+)/
|
|
111
113
|
|
|
112
114
|
# a sanity check, especially for Linux-VServer, OpenVZ and LXC:
|
|
113
115
|
# don't report the route entry if the src address isn't set on the node
|
|
@@ -190,8 +190,11 @@ Ohai.plugin(:Virtualization) do
|
|
|
190
190
|
# Kernel docs, https://www.kernel.org/doc/Documentation/cgroups
|
|
191
191
|
if File.exist?("/proc/self/cgroup")
|
|
192
192
|
cgroup_content = File.read("/proc/self/cgroup")
|
|
193
|
-
|
|
194
|
-
|
|
193
|
+
# These two REs catch many different examples. Here's a specific one
|
|
194
|
+
# from when it is docker and there is no subsystem name.
|
|
195
|
+
# https://rubular.com/r/dV13hiU9KxmiWB
|
|
196
|
+
if cgroup_content =~ %r{^\d+:[^:]*:/(lxc|docker)/.+$} ||
|
|
197
|
+
cgroup_content =~ %r{^\d+:[^:]*:/[^/]+/(lxc|docker)-?.+$}
|
|
195
198
|
logger.trace("Plugin Virtualization: /proc/self/cgroup indicates #{$1} container. Detecting as #{$1} guest")
|
|
196
199
|
virtualization[:system] = $1
|
|
197
200
|
virtualization[:role] = "guest"
|
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.2.
|
|
4
|
+
version: 16.2.3
|
|
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-06-
|
|
11
|
+
date: 2020-06-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: systemu
|