mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Moved down container check code below hypervisors to validate containers type running in virtual environment.
Fixes #46754 & #43405
This commit is contained in:
parent
710f74c4a6
commit
7e704c0e81
@ -763,6 +763,7 @@ def _virtual(osdata):
|
||||
# If a Dom0 or DomU was detected, obviously this is xen
|
||||
if 'dom' in grains.get('virtual_subtype', '').lower():
|
||||
grains['virtual'] = 'xen'
|
||||
# Check container type after hypervisors, to avoid variable overwrite on containers running in virtual environment.
|
||||
if os.path.isfile('/proc/1/cgroup'):
|
||||
try:
|
||||
with salt.utils.fopen('/proc/1/cgroup', 'r') as fhr:
|
||||
|
Loading…
Reference in New Issue
Block a user