aboutsummaryrefslogtreecommitdiff
path: root/pkg/domain
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2020-06-11 13:28:02 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2020-06-11 13:28:05 +0200
commitedeccb678f70da76edf1b767941c467499380565 (patch)
treecac1c27804890cca8e1ee1217ab2205be5659b50 /pkg/domain
parent7b85d5c6d272da17bcdb9fb266859c3e5ec8fd09 (diff)
downloadpodman-edeccb678f70da76edf1b767941c467499380565.tar.gz
podman-edeccb678f70da76edf1b767941c467499380565.tar.bz2
podman-edeccb678f70da76edf1b767941c467499380565.zip
podman: create scope only if --cgroup-manager=systemd
drop check for current cgroup ownership if the cgroup manager is not set to systemd. Closes: https://github.com/containers/libpod/issues/4483 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'pkg/domain')
-rw-r--r--pkg/domain/infra/abi/system.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/pkg/domain/infra/abi/system.go b/pkg/domain/infra/abi/system.go
index b91dd513d..33ba58558 100644
--- a/pkg/domain/infra/abi/system.go
+++ b/pkg/domain/infra/abi/system.go
@@ -72,11 +72,9 @@ func (ic *ContainerEngine) SetupRootless(_ context.Context, cmd *cobra.Command)
return err
}
unitName := fmt.Sprintf("podman-%d.scope", os.Getpid())
- if err := utils.RunUnderSystemdScope(os.Getpid(), "user.slice", unitName); err != nil {
- if conf.Engine.CgroupManager == config.SystemdCgroupsManager {
+ if conf.Engine.CgroupManager == config.SystemdCgroupsManager {
+ if err := utils.RunUnderSystemdScope(os.Getpid(), "user.slice", unitName); err != nil {
logrus.Warnf("Failed to add podman to systemd sandbox cgroup: %v", err)
- } else {
- logrus.Debugf("Failed to add podman to systemd sandbox cgroup: %v", err)
}
}
}