diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2018-11-28 04:27:37 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-28 04:27:37 -0800 |
commit | dd315cc043a1eda3bec1de6033c043943a3c429e (patch) | |
tree | 55d679e5e734a686115bd14808d8c618be56c9f9 | |
parent | 6df7409cb5a41c710164c42ed35e33b28f3f7214 (diff) | |
parent | 0365f573710dfc8ee7f9e13082a238deea675dec (diff) | |
download | podman-dd315cc043a1eda3bec1de6033c043943a3c429e.tar.gz podman-dd315cc043a1eda3bec1de6033c043943a3c429e.tar.bz2 podman-dd315cc043a1eda3bec1de6033c043943a3c429e.zip |
Merge pull request #1861 from giuseppe/fix-rootless-cleanup
rootless: fix cleanup
-rw-r--r-- | libpod/oci.go | 4 | ||||
-rw-r--r-- | test/e2e/rootless_test.go | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/libpod/oci.go b/libpod/oci.go index a7aec06e5..ee1677b67 100644 --- a/libpod/oci.go +++ b/libpod/oci.go @@ -316,6 +316,10 @@ func (r *OCIRuntime) createOCIContainer(ctr *Container, cgroupParent string, res cmd.Env = append(r.conmonEnv, fmt.Sprintf("_OCI_SYNCPIPE=%d", 3)) cmd.Env = append(cmd.Env, fmt.Sprintf("_OCI_STARTPIPE=%d", 4)) cmd.Env = append(cmd.Env, fmt.Sprintf("XDG_RUNTIME_DIR=%s", runtimeDir)) + cmd.Env = append(cmd.Env, fmt.Sprintf("_LIBPOD_USERNS_CONFIGURED=%s", os.Getenv("_LIBPOD_USERNS_CONFIGURED"))) + cmd.Env = append(cmd.Env, fmt.Sprintf("_LIBPOD_ROOTLESS_UID=%s", os.Getenv("_LIBPOD_ROOTLESS_UID"))) + cmd.Env = append(cmd.Env, fmt.Sprintf("HOME=%s", os.Getenv("HOME"))) + cmd.Env = append(cmd.Env, fmt.Sprintf("XDG_RUNTIME_DIR=%s", runtimeDir)) if r.reservePorts { ports, err := bindPorts(ctr.config.PortMappings) diff --git a/test/e2e/rootless_test.go b/test/e2e/rootless_test.go index 995744ae5..676459416 100644 --- a/test/e2e/rootless_test.go +++ b/test/e2e/rootless_test.go @@ -205,6 +205,10 @@ var _ = Describe("Podman rootless", func() { cmd.WaitWithDefaultTimeout() Expect(cmd.ExitCode()).To(Equal(0)) + cmd = rootlessTest.PodmanAsUser([]string{"inspect", "-l", "--type", "container", "--format", "{{ .State.Status }}"}, 1000, 1000, env) + cmd.WaitWithDefaultTimeout() + Expect(cmd.LineInOutputContains("exited")).To(BeTrue()) + cmd = rootlessTest.PodmanAsUser([]string{"start", "-l"}, 1000, 1000, env) cmd.WaitWithDefaultTimeout() Expect(cmd.ExitCode()).To(Equal(0)) |