diff options
author | Matthew Heon <mheon@redhat.com> | 2019-02-19 15:39:32 -0500 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2019-02-19 17:16:43 -0500 |
commit | 5642472c4956b87d38e75ce05b348b708fbf932f (patch) | |
tree | c60b1c231b8e678b46487f9b29f1d77f81c6439a /cmd/podman/create.go | |
parent | 82ae36c15726a4adb3242938ed2396be30bd479a (diff) | |
download | podman-5642472c4956b87d38e75ce05b348b708fbf932f.tar.gz podman-5642472c4956b87d38e75ce05b348b708fbf932f.tar.bz2 podman-5642472c4956b87d38e75ce05b348b708fbf932f.zip |
Ensure that userns is created for stopped rootless pods
Signed-off-by: Matthew Heon <mheon@redhat.com>
Diffstat (limited to 'cmd/podman/create.go')
-rw-r--r-- | cmd/podman/create.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd/podman/create.go b/cmd/podman/create.go index 216f171a8..12b793d23 100644 --- a/cmd/podman/create.go +++ b/cmd/podman/create.go @@ -868,6 +868,12 @@ func joinOrCreateRootlessUserNamespace(createConfig *cc.CreateConfig, runtime *l if err != nil { return false, -1, err } + if pid == 0 { + if createConfig.Pod != "" { + continue + } + return false, -1, errors.Errorf("dependency container %s is not running", ctr.ID()) + } return rootless.JoinNS(uint(pid)) } } |