Commit 8c3b5690 by Toshio Kuratomi

Merge pull request #10357 from htgoebel/devel

Fix detect of docker as virtualization_type.
parents c2a87a20 8758ae20
...@@ -2383,7 +2383,7 @@ class LinuxVirtual(Virtual): ...@@ -2383,7 +2383,7 @@ class LinuxVirtual(Virtual):
if os.path.exists('/proc/1/cgroup'): if os.path.exists('/proc/1/cgroup'):
for line in get_file_lines('/proc/1/cgroup'): for line in get_file_lines('/proc/1/cgroup'):
if re.search('/docker/', line): if re.search(r'/docker(/|-[0-9a-f]+\.scope)', line):
self.facts['virtualization_type'] = 'docker' self.facts['virtualization_type'] = 'docker'
self.facts['virtualization_role'] = 'guest' self.facts['virtualization_role'] = 'guest'
return return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment