From 13da33e542f1714488ea12afee0c7404b40959aa Mon Sep 17 00:00:00 2001 From: Michael Armijo Date: Tue, 12 Nov 2024 17:46:51 -0700 Subject: [PATCH 1/2] kola/podman.go: use fedora container in podman.workflow This test has been denylisted in FCOS due to rate limiting issues with the nginx container, causing frequent timeouts and failures. Replace the nginx container with the `fedora:latest` container from quay.io to mitigate this. Also modify the `podman run` command to start a Python HTTP server to continue testing volume mounting and port forwarding. --- mantle/kola/tests/podman/podman.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mantle/kola/tests/podman/podman.go b/mantle/kola/tests/podman/podman.go index d14f811489..6940e4b252 100644 --- a/mantle/kola/tests/podman/podman.go +++ b/mantle/kola/tests/podman/podman.go @@ -129,8 +129,8 @@ func podmanWorkflow(c cluster.TestCluster) { m := c.Machines()[0] // Test: Verify container can run with volume mount and port forwarding - image := "docker.io/library/nginx" - wwwRoot := "/usr/share/nginx/html" + image := "quay.io/fedora/fedora" + wwwRoot := "/var/html" var id string c.Run("run", func(c cluster.TestCluster) { @@ -138,7 +138,8 @@ func podmanWorkflow(c cluster.TestCluster) { cmd := fmt.Sprintf("echo TEST PAGE > %s/index.html", string(dir)) c.RunCmdSync(m, cmd) - cmd = fmt.Sprintf("sudo podman run -d -p 80:80 -v %s/index.html:%s/index.html:z %s", string(dir), wwwRoot, image) + webServerCmd := fmt.Sprintf("sh -c 'dnf install -y python3 && python3 -m http.server -d %s 80'", wwwRoot) + cmd = fmt.Sprintf("sudo podman run -d -p 80:80 -v %s/index.html:%s/index.html:z %s %s", string(dir), wwwRoot, image, webServerCmd) out := c.MustSSH(m, cmd) id = string(out)[0:64] From 2f0c777c87b155d95ec5c6db7d4724dc460a2949 Mon Sep 17 00:00:00 2001 From: Michael Armijo Date: Tue, 12 Nov 2024 18:32:40 -0700 Subject: [PATCH 2/2] kola/core.go: remove fcos.internet test This test has been denylisted in FCOS for a long time due to rate limiting issues with the busybox container. The functionality of the test is covered by other FCOS tests so it can be removed. Also remove some older, obsolete functions that were probably a part of this test in the past. see: https://issues.redhat.com/browse/COS-2094 --- mantle/kola/tests/coretest/core.go | 41 ------------------------------ 1 file changed, 41 deletions(-) diff --git a/mantle/kola/tests/coretest/core.go b/mantle/kola/tests/coretest/core.go index 38e01c63f4..4e27a89d10 100644 --- a/mantle/kola/tests/coretest/core.go +++ b/mantle/kola/tests/coretest/core.go @@ -16,7 +16,6 @@ import ( "github.com/coreos/coreos-assembler/mantle/kola/register" "github.com/coreos/coreos-assembler/mantle/platform" "github.com/coreos/coreos-assembler/mantle/platform/machine/qemu" - "github.com/coreos/coreos-assembler/mantle/util" ) const ( @@ -91,21 +90,6 @@ func init() { // only work on x86_64 and aarch64. Architectures: []string{"x86_64", "aarch64"}, }) - // TODO: Enable DockerPing/DockerEcho once fixed - // TODO: Only enable PodmanPing on non qemu. Needs: - // https://github.com/coreos/mantle/issues/1132 - register.RegisterTest(®ister.Test{ - Name: "fcos.internet", - Description: "Verify that podman echo and get head work.", - Run: InternetTests, - ClusterSize: 1, - Tags: []string{kola.NeedsInternetTag}, - NativeFuncs: map[string]register.NativeFuncWrap{ - "PodmanEcho": register.CreateNativeFuncWrap(TestPodmanEcho), - "PodmanWgetHead": register.CreateNativeFuncWrap(TestPodmanWgetHead), - }, - Distros: []string{"fcos"}, - }) register.RegisterTest(®ister.Test{ Name: "rootfs.uuid", Description: "Verify that the root disk's GUID was set to a random one on first boot.", @@ -179,31 +163,6 @@ func TestPortSsh() error { return nil } -func TestDockerEcho() error { - //t.Parallel() - return util.RunCmdTimeout(DockerTimeout, "docker", "run", "busybox", "echo") -} - -func TestDockerPing() error { - //t.Parallel() - return util.RunCmdTimeout(DockerTimeout, "docker", "run", "busybox", "ping", "-c4", "coreos.com") -} - -func TestPodmanEcho() error { - //t.Parallel() - return util.RunCmdTimeout(DockerTimeout, "podman", "run", "busybox", "echo") -} - -func TestPodmanPing() error { - //t.Parallel() - return util.RunCmdTimeout(DockerTimeout, "podman", "run", "busybox", "ping", "-c4", "coreos.com") -} - -func TestPodmanWgetHead() error { - //t.Parallel() - return util.RunCmdTimeout(DockerTimeout, "podman", "run", "busybox", "wget", "--spider", "http://fedoraproject.org/static/hotspot.txt") -} - // This execs gdbus, because we need to change uses to test perms. func TestDbusPerms() error { c := exec.Command(