mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +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
1 changed files with 1 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue