diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-06-11 08:58:40 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-11 08:58:40 -0400 |
commit | 5f3e64f64317d05ba457b2912c85c177635eb558 (patch) | |
tree | 13a989b6333314b9a884c475cf6ae3f36dd00e95 /pkg/domain/infra/abi | |
parent | 1060a94efbecdb2461d8005d6cc79976eaeee5ac (diff) | |
parent | edeccb678f70da76edf1b767941c467499380565 (diff) | |
download | podman-5f3e64f64317d05ba457b2912c85c177635eb558.tar.gz podman-5f3e64f64317d05ba457b2912c85c177635eb558.tar.bz2 podman-5f3e64f64317d05ba457b2912c85c177635eb558.zip |
Merge pull request #6569 from giuseppe/create-slice-only-systemd
podman: create scope only if --cgroup-manager=systemd
Diffstat (limited to 'pkg/domain/infra/abi')
-rw-r--r-- | pkg/domain/infra/abi/system.go | 6 |
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) } } } |