From e0d940463475b907d56aa548401f8ba916cec21b Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Tue, 2 Jun 2020 14:02:54 -0400 Subject: Enable detached exec for remote The biggest obstacle here was cleanup - we needed a way to remove detached exec sessions after they exited, but there's no way to tell if an exec session will be attached or detached when it's created, and that's when we must add the exit command that would do the removal. The solution was adding a delay to the exit command (5 minutes), which gives sufficient time for attached exec sessions to retrieve the exit code of the session after it exits, but still guarantees that they will be removed, even for detached sessions. This requires Conmon 2.0.17, which has the new `--exit-delay` flag. As part of the exit command rework, we can drop the hack we were using to clean up exec sessions (remove them as part of inspect). This is a lot cleaner, and I'm a lot happier about it. Otherwise, this is just plumbing - we need a bindings call for detached exec, and that needed to be added to the tunnel mode backend for entities. Signed-off-by: Matthew Heon --- test/e2e/exec_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/e2e/exec_test.go b/test/e2e/exec_test.go index 8ec666c2b..b152da9e6 100644 --- a/test/e2e/exec_test.go +++ b/test/e2e/exec_test.go @@ -25,6 +25,10 @@ var _ = Describe("Podman exec", func() { podmanTest = PodmanTestCreate(tempdir) podmanTest.Setup() podmanTest.SeedImages() + // HACK: Remove this once we get Conmon 2.0.17 on Ubuntu + if podmanTest.Host.Distribution == "ubuntu" { + Skip("Unable to perform test on Ubuntu distributions due to too-old Conmon (need 2.0.17)") + } }) AfterEach(func() { @@ -284,7 +288,6 @@ var _ = Describe("Podman exec", func() { }) It("podman exec --detach", func() { - Skip(v2remotefail) ctrName := "testctr" ctr := podmanTest.Podman([]string{"run", "-t", "-i", "-d", "--name", ctrName, ALPINE, "top"}) ctr.WaitWithDefaultTimeout() -- cgit v1.2.3-54-g00ecf