mirror of
https://github.com/containers/podman.git
synced 2025-12-13 18:37:36 +08:00
Merge pull request #7811 from rhatdan/sysctls
Ignore containers.conf sysctl when namespaces set to host
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -373,6 +373,11 @@ USER bin`
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Equal(0))
|
||||
Expect(session.OutputToString()).To(ContainSubstring("net.core.somaxconn = 65535"))
|
||||
|
||||
// network sysctls should fail if --net=host is set
|
||||
session = podmanTest.Podman([]string{"run", "--net", "host", "--rm", "--sysctl", "net.core.somaxconn=65535", ALPINE, "sysctl", "net.core.somaxconn"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Equal(125))
|
||||
})
|
||||
|
||||
It("podman run blkio-weight test", func() {
|
||||
|
||||
Reference in New Issue
Block a user