summaryrefslogtreecommitdiff
path: root/test/e2e/containers_conf_test.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2020-09-28 15:55:06 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2020-09-28 16:17:28 -0400
commit0d70df119539d818224b0d014602aaad2bd1b95e (patch)
treea1f4db621a686c8558a222ad66727cf0d63836d5 /test/e2e/containers_conf_test.go
parentb0e70a6411d70d7ee7f1e9d6abedc2524b903609 (diff)
downloadpodman-0d70df119539d818224b0d014602aaad2bd1b95e.tar.gz
podman-0d70df119539d818224b0d014602aaad2bd1b95e.tar.bz2
podman-0d70df119539d818224b0d014602aaad2bd1b95e.zip
Ignore containers.conf sysctl when namespaces set to host
If user sets namespace to host, then default sysctls need to be ignored that are specific to that namespace. --net=host ignore sysctls that begin with net. --ipc=host ignore fs.mqueue --uts=host ignore kernel.domainname and kernel.hostname Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'test/e2e/containers_conf_test.go')
-rw-r--r--test/e2e/containers_conf_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/e2e/containers_conf_test.go b/test/e2e/containers_conf_test.go
index 02c5d1428..ddb62c327 100644
--- a/test/e2e/containers_conf_test.go
+++ b/test/e2e/containers_conf_test.go
@@ -179,6 +179,12 @@ var _ = Describe("Podman run", func() {
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
Expect(session.OutputToString()).To(ContainSubstring("1000"))
+
+ // Ignore containers.conf setting if --net=host
+ session = podmanTest.Podman([]string{"run", "--rm", "--net", "host", fedoraMinimal, "cat", "/proc/sys/net/ipv4/ping_group_range"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(session.OutputToString()).ToNot((ContainSubstring("1000")))
})
It("podman run containers.conf search domain", func() {