aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJake Hunsaker <jhunsake@redhat.com>2020-11-20 16:04:06 -0500
committerJake Hunsaker <jhunsake@redhat.com>2020-11-23 10:42:53 -0500
commitd2639f7c217f9cc727161ed3608fe044fdde05ab (patch)
tree0381c2e132846b52da5d1f29c4a0873cd389533f
parentb8f864e9a40ec0e7a21442d3a854ddf915a827b9 (diff)
downloadsos-d2639f7c217f9cc727161ed3608fe044fdde05ab.tar.gz
[redhat] Add podman to valid container env vars
In newer versions of podman, the `container` env var set inside the container will be set to `podman` instead of `oci`. Add this value to the list of valid values to use to determine if sos is running inside a container or not, for when we want to capture from the host system. Resolves: #2320 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
-rw-r--r--sos/policies/redhat.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sos/policies/redhat.py b/sos/policies/redhat.py
index 3a65b9fa..577ca210 100644
--- a/sos/policies/redhat.py
+++ b/sos/policies/redhat.py
@@ -140,7 +140,7 @@ class RedHatPolicy(LinuxPolicy):
specific initialisation based on ENV_HOST_SYSROOT.
"""
if ENV_CONTAINER in os.environ:
- if os.environ[ENV_CONTAINER] in ['docker', 'oci']:
+ if os.environ[ENV_CONTAINER] in ['docker', 'oci', 'podman']:
self._in_container = True
if ENV_HOST_SYSROOT in os.environ:
self._host_sysroot = os.environ[ENV_HOST_SYSROOT]