diff --git a/plugins/connection/podman.py b/plugins/connection/podman.py index 6eea59f8..12b542e6 100644 --- a/plugins/connection/podman.py +++ b/plugins/connection/podman.py @@ -11,6 +11,7 @@ __metaclass__ = type import distutils.spawn +import os import shlex import shutil import subprocess @@ -141,6 +142,9 @@ def _connect(self): rc, self._mount_point, stderr = self._podman("mount") if rc != 0: display.v("Failed to mount container %s: %s" % (self._container_id, stderr.strip())) + elif not os.listdir(self._mount_point.strip()): + display.v("Failed to mount container with CGroups2: empty dir %s" % self._mount_point.strip()) + self._mount_point = None else: self._mount_point = self._mount_point.strip() display.vvvvv("MOUNTPOINT %s RC %s STDERR %r" % (self._mount_point, rc, stderr))