From d2639f7c217f9cc727161ed3608fe044fdde05ab Mon Sep 17 00:00:00 2001 From: Jake Hunsaker Date: Fri, 20 Nov 2020 16:04:06 -0500 Subject: [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 --- sos/policies/redhat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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] -- cgit