ohai 8.26.0 → 8.26.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45d066cc35bc83eb5adba2d23ebc9a4e39451d072a6e1fda5e53a68c50741246
|
4
|
+
data.tar.gz: 78bd290648898961bc06912973654fad4e75c374f837998dfb0cb018c9c66fe4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4f8708b309cc4d5b8fd7ae63a09c2ea07b0fa6e878c03abfea9b1628c39fb26875b4bb3bad8d3713c55a17cdc310d30fe01ac40cbd8b3cf8e42d63993b29167
|
7
|
+
data.tar.gz: 8a114eb384b9561d749117610a675e630b94d5beae99de7633495eb944b429b096a70664427136f6dfc11ad94759869d21910b67a9311a42c4df81d47bca24ab
|
@@ -185,7 +185,7 @@ Ohai.plugin(:Virtualization) do
|
|
185
185
|
if File.exist?("/proc/self/cgroup")
|
186
186
|
cgroup_content = File.read("/proc/self/cgroup")
|
187
187
|
if cgroup_content =~ %r{^\d+:[^:]+:/(lxc|docker)/.+$} ||
|
188
|
-
cgroup_content =~ %r{^\d+:[^:]+:/[^/]+/(lxc|docker)
|
188
|
+
cgroup_content =~ %r{^\d+:[^:]+:/[^/]+/(lxc|docker)-?.+$}
|
189
189
|
Ohai::Log.debug("Plugin Virtualization: /proc/self/cgroup indicates #{$1} container. Detecting as #{$1} guest")
|
190
190
|
virtualization[:system] = $1
|
191
191
|
virtualization[:role] = "guest"
|
data/lib/ohai/version.rb
CHANGED
@@ -649,6 +649,30 @@ CGROUP
|
|
649
649
|
expect(plugin[:virtualization][:systems][:docker]).to eq("guest")
|
650
650
|
end
|
651
651
|
|
652
|
+
it "sets docker guest if /proc/self/cgroup exist and there are /docker/docker-ce/<hexadecimal> mounts" do
|
653
|
+
self_cgroup = <<-CGROUP
|
654
|
+
13:name=systemd:/docker-ce/docker/b15b85d19304436488a78d06afeb108d94b20bb6898d852b65cad51bd7dc9468
|
655
|
+
12:pids:/docker-ce/docker/b15b85d19304436488a78d06afeb108d94b20bb6898d852b65cad51bd7dc9468
|
656
|
+
11:hugetlb:/docker-ce/docker/b15b85d19304436488a78d06afeb108d94b20bb6898d852b65cad51bd7dc9468
|
657
|
+
10:net_prio:/docker-ce/docker/b15b85d19304436488a78d06afeb108d94b20bb6898d852b65cad51bd7dc9468
|
658
|
+
9:perf_event:/docker-ce/docker/b15b85d19304436488a78d06afeb108d94b20bb6898d852b65cad51bd7dc9468
|
659
|
+
8:net_cls:/docker-ce/docker/b15b85d19304436488a78d06afeb108d94b20bb6898d852b65cad51bd7dc9468
|
660
|
+
7:freezer:/docker-ce/docker/b15b85d19304436488a78d06afeb108d94b20bb6898d852b65cad51bd7dc9468
|
661
|
+
6:devices:/docker-ce/docker/b15b85d19304436488a78d06afeb108d94b20bb6898d852b65cad51bd7dc9468
|
662
|
+
5:memory:/docker-ce/docker/b15b85d19304436488a78d06afeb108d94b20bb6898d852b65cad51bd7dc9468
|
663
|
+
4:blkio:/docker-ce/docker/b15b85d19304436488a78d06afeb108d94b20bb6898d852b65cad51bd7dc9468
|
664
|
+
3:cpuacct:/docker-ce/docker/b15b85d19304436488a78d06afeb108d94b20bb6898d852b65cad51bd7dc9468
|
665
|
+
2:cpu:/docker-ce/docker/b15b85d19304436488a78d06afeb108d94b20bb6898d852b65cad51bd7dc9468
|
666
|
+
1:cpuset:/docker-ce/docker/b15b85d19304436488a78d06afeb108d94b20bb6898d852b65cad51bd7dc9468
|
667
|
+
CGROUP
|
668
|
+
allow(File).to receive(:exist?).with("/proc/self/cgroup").and_return(true)
|
669
|
+
allow(File).to receive(:read).with("/proc/self/cgroup").and_return(self_cgroup)
|
670
|
+
plugin.run
|
671
|
+
expect(plugin[:virtualization][:system]).to eq("docker")
|
672
|
+
expect(plugin[:virtualization][:role]).to eq("guest")
|
673
|
+
expect(plugin[:virtualization][:systems][:docker]).to eq("guest")
|
674
|
+
end
|
675
|
+
|
652
676
|
# Relevant at least starting docker 1.6.2, kernel 4.0.5 & systemd 224-1.
|
653
677
|
# Doi not exactly know which software/version really matters here.
|
654
678
|
it "should set docker guest if /proc/self/cgroup exists and there are /system.slice/docker-<hexadecimal> mounts (systemd managed cgroup)" do
|
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: 8.26.
|
4
|
+
version: 8.26.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: 2018-01-
|
11
|
+
date: 2018-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: systemu
|
@@ -548,7 +548,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
548
548
|
version: '0'
|
549
549
|
requirements: []
|
550
550
|
rubyforge_project:
|
551
|
-
rubygems_version: 2.7.
|
551
|
+
rubygems_version: 2.7.4
|
552
552
|
signing_key:
|
553
553
|
specification_version: 4
|
554
554
|
summary: Ohai profiles your system and emits JSON
|