summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-09-13 18:44:52 +0200
committerGitHub <noreply@github.com>2019-09-13 18:44:52 +0200
commit9b83882114d5b510315495616b4bf599aca9b7c1 (patch)
treec4e468a95c68660ed1de0f06e7c46c6bf85475af
parente8a44ebd460a2cc2d499b02cb4e0f699a9965b85 (diff)
parent466694b881e2494c431172f326738016a63ed263 (diff)
downloadpodman-9b83882114d5b510315495616b4bf599aca9b7c1.tar.gz
podman-9b83882114d5b510315495616b4bf599aca9b7c1.tar.bz2
podman-9b83882114d5b510315495616b4bf599aca9b7c1.zip
Merge pull request #4018 from giuseppe/fix-error-message-rootless
rootless: report the correct error
-rw-r--r--cmd/podman/main_local.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/podman/main_local.go b/cmd/podman/main_local.go
index cad256615..08d7ccaf4 100644
--- a/cmd/podman/main_local.go
+++ b/cmd/podman/main_local.go
@@ -178,9 +178,9 @@ func setupRootless(cmd *cobra.Command, args []string) error {
if !ownsCgroup {
unitName := fmt.Sprintf("podman-%d.scope", os.Getpid())
if err := utils.RunUnderSystemdScope(os.Getpid(), "user.slice", unitName); err != nil {
- conf, err := runtime.GetConfig()
- if err != nil {
- return err
+ 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)