diff options
author | openshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com> | 2022-06-21 18:01:15 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-21 18:01:15 +0000 |
commit | 7724eb07cea1965da598dfb3b959de53bb4c4a41 (patch) | |
tree | 0f7c8d6554d63153fb07159b30fe2975f86498fc /pkg/domain/infra | |
parent | fe974101ebc30d7902d29daa2e7832e61041f46e (diff) | |
parent | ecf225019a6cbb37edc5cc938ba260248d351c89 (diff) | |
download | podman-7724eb07cea1965da598dfb3b959de53bb4c4a41.tar.gz podman-7724eb07cea1965da598dfb3b959de53bb4c4a41.tar.bz2 podman-7724eb07cea1965da598dfb3b959de53bb4c4a41.zip |
Merge pull request #14638 from giuseppe/improve-error-messages-rootless-unshare
pkg/rootless: error messages improvements
Diffstat (limited to 'pkg/domain/infra')
-rw-r--r-- | pkg/domain/infra/abi/system.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/pkg/domain/infra/abi/system.go b/pkg/domain/infra/abi/system.go index 820ba529b..6be37c87f 100644 --- a/pkg/domain/infra/abi/system.go +++ b/pkg/domain/infra/abi/system.go @@ -125,8 +125,14 @@ func (ic *ContainerEngine) SetupRootless(_ context.Context, noMoveProcess bool) paths = append(paths, ctr.Config().ConmonPidFile) } - became, ret, err = rootless.TryJoinFromFilePaths(pausePidPath, true, paths) - utils.MovePauseProcessToScope(pausePidPath) + if len(paths) > 0 { + became, ret, err = rootless.TryJoinFromFilePaths(pausePidPath, true, paths) + } else { + became, ret, err = rootless.BecomeRootInUserNS(pausePidPath) + if err == nil { + utils.MovePauseProcessToScope(pausePidPath) + } + } if err != nil { logrus.Error(errors.Wrapf(err, "invalid internal status, try resetting the pause process with %q", os.Args[0]+" system migrate")) os.Exit(1) |