diff options
author | Chris Evich <cevich@redhat.com> | 2020-11-03 15:10:31 -0500 |
---|---|---|
committer | Chris Evich <cevich@redhat.com> | 2020-11-04 09:37:35 -0500 |
commit | f37d1d2175445a3c8d2a5eb25748c274433083b0 (patch) | |
tree | 65397263790b5409815ff61b37512f2293ec07fe | |
parent | 303191bf522db9af32cabd98a5309e3079da0eb0 (diff) | |
download | podman-f37d1d2175445a3c8d2a5eb25748c274433083b0.tar.gz podman-f37d1d2175445a3c8d2a5eb25748c274433083b0.tar.bz2 podman-f37d1d2175445a3c8d2a5eb25748c274433083b0.zip |
Use ping from alpine
As of this commit, in Fedora 33, without without `CAP_NET_ADMIN` and
`CAP_NET_RAW`, require setting `net.ipv3.ping_group_range` in order for
the `ping` command to work inside a container. However, not all images
`ping` are created equal. For whatever reason, the busybox version in
the busybox container image, does not function. Switch to the Alpine
image's busybox ping, which seems to work fine.
Signed-off-by: Chris Evich <cevich@redhat.com>
-rw-r--r-- | test/e2e/pod_infra_container_test.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/e2e/pod_infra_container_test.go b/test/e2e/pod_infra_container_test.go index 797d51c33..7ec36b2f8 100644 --- a/test/e2e/pod_infra_container_test.go +++ b/test/e2e/pod_infra_container_test.go @@ -383,12 +383,14 @@ var _ = Describe("Podman pod create", func() { podID := session.OutputToString() // verify we can add a host to the infra's /etc/hosts - session = podmanTest.Podman([]string{"run", "--pod", podID, "--add-host", "foobar:127.0.0.1", BB, "ping", "-c", "1", "foobar"}) + // N/B: Using alpine for ping, since BB ping throws + // permission denied error as of Fedora 33. + session = podmanTest.Podman([]string{"run", "--pod", podID, "--add-host", "foobar:127.0.0.1", ALPINE, "ping", "-c", "1", "foobar"}) session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) // verify we can see the other hosts of infra's /etc/hosts - session = podmanTest.Podman([]string{"run", "--pod", podID, BB, "ping", "-c", "1", "foobar"}) + session = podmanTest.Podman([]string{"run", "--pod", podID, ALPINE, "ping", "-c", "1", "foobar"}) session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) }) |