From 5642472c4956b87d38e75ce05b348b708fbf932f Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Tue, 19 Feb 2019 15:39:32 -0500 Subject: Ensure that userns is created for stopped rootless pods Signed-off-by: Matthew Heon --- cmd/podman/create.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'cmd/podman') 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)) } } -- cgit v1.2.3-54-g00ecf