From 9ae7b1a5b176176b1b6a0b8e5d191783b68d9b2c Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Mon, 16 Jul 2018 13:40:59 +0200 Subject: oci: keep exposed ports busy and leak the fd into conmon Bind all the specified TCP and UDP ports so that another process cannot reuse them. The fd of the listener is then leaked into conmon so that the socket is kept busy until the container exits. Closes: https://github.com/projectatomic/libpod/issues/210 Signed-off-by: Giuseppe Scrivano Closes: #1100 Approved by: mheon --- test/e2e/run_networking_test.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/e2e') diff --git a/test/e2e/run_networking_test.go b/test/e2e/run_networking_test.go index 9a2858ca1..e1c1608b9 100644 --- a/test/e2e/run_networking_test.go +++ b/test/e2e/run_networking_test.go @@ -65,6 +65,10 @@ var _ = Describe("Podman rmi", func() { results.Wait(30) Expect(results.ExitCode()).To(Equal(0)) Expect(results.OutputToString()).To(ContainSubstring("8000")) + + ncBusy := podmanTest.SystemExec("nc", []string{"-l", "-p", "80"}) + ncBusy.Wait(10) + Expect(ncBusy.ExitCode()).ToNot(Equal(0)) }) It("podman run network expose ports in image metadata", func() { -- cgit v1.2.3-54-g00ecf