diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-10-24 01:20:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-24 01:20:25 +0200 |
commit | 674dc2bc750161ab19db79417db1831af45b0c75 (patch) | |
tree | 6aea92e6dc757d520fce9c118c1d70e8daa371a6 /cmd/podman | |
parent | 299a430759c236400188dcf77c7da2a97649cdcb (diff) | |
parent | 13fe146840c4d9d27fd509189735ce0fc7b944f8 (diff) | |
download | podman-674dc2bc750161ab19db79417db1831af45b0c75.tar.gz podman-674dc2bc750161ab19db79417db1831af45b0c75.tar.bz2 podman-674dc2bc750161ab19db79417db1831af45b0c75.zip |
Merge pull request #4228 from giuseppe/detect-no-systemd-session
rootless: detect no system session with --cgroup-manager=systemd
Diffstat (limited to 'cmd/podman')
-rw-r--r-- | cmd/podman/main_local.go | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/cmd/podman/main_local.go b/cmd/podman/main_local.go index bdffb6b1e..202d93b35 100644 --- a/cmd/podman/main_local.go +++ b/cmd/podman/main_local.go @@ -174,14 +174,13 @@ func setupRootless(cmd *cobra.Command, args []string) error { if err != nil { return err } - + conf, err := runtime.GetConfig() + if err != nil { + return err + } if !ownsCgroup { unitName := fmt.Sprintf("podman-%d.scope", os.Getpid()) if err := utils.RunUnderSystemdScope(os.Getpid(), "user.slice", unitName); err != nil { - conf, err2 := runtime.GetConfig() - if err2 != nil { - return err2 - } if conf.CgroupManager == libpod.SystemdCgroupsManager { logrus.Warnf("Failed to add podman to systemd sandbox cgroup: %v", err) } else { |