diff --git a/.cirrus.yml b/.cirrus.yml index ca874e5ef945..3a00feaf9a92 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -33,7 +33,7 @@ env: DEBIAN_NAME: "debian-13" # Image identifiers - IMAGE_SUFFIX: "c20240513t140131z-f40f39d13" + IMAGE_SUFFIX: "c20240514t134014z-f40f39d13" # EC2 images FEDORA_AMI: "fedora-aws-${IMAGE_SUFFIX}" @@ -58,6 +58,7 @@ env: DISTRO_NV: # any {PRIOR_,}{FEDORA,DEBIAN}_NAME value VM_IMAGE_NAME: # One of the "Google-cloud VM Images" (above) CTR_FQIN: # One of the "Container FQIN's" (above) + CI_DESIRED_RUNTIME: crun # As of 2024-05-14 there are no other supported runtimes CI_DESIRED_DATABASE: sqlite # 'sqlite' or 'boltdb' CI_DESIRED_STORAGE: overlay # overlay or vfs @@ -103,12 +104,10 @@ build_task: VM_IMAGE_NAME: ${FEDORA_CACHE_IMAGE_NAME} CTR_FQIN: ${FEDORA_CONTAINER_FQIN} # ID for re-use of build output - CI_DESIRED_RUNTIME: crun - env: DISTRO_NV: ${PRIOR_FEDORA_NAME} VM_IMAGE_NAME: ${PRIOR_FEDORA_CACHE_IMAGE_NAME} CTR_FQIN: ${PRIOR_FEDORA_CONTAINER_FQIN} - CI_DESIRED_RUNTIME: crun CI_DESIRED_DATABASE: boltdb CI_DESIRED_STORAGE: vfs - env: @@ -119,7 +118,6 @@ build_task: - env: DISTRO_NV: ${DEBIAN_NAME} VM_IMAGE_NAME: ${DEBIAN_CACHE_IMAGE_NAME} - CI_DESIRED_RUNTIME: runc CI_DESIRED_NETWORK: netavark # Ignore cgroups-v1 warnings on debian PODMAN_IGNORE_CGROUPSV1_WARNING: true @@ -222,7 +220,6 @@ build_aarch64_task: DISTRO_NV: ${FEDORA_AARCH64_NAME} VM_IMAGE_NAME: ${FEDORA_AARCH64_AMI} CTR_FQIN: ${FEDORA_CONTAINER_FQIN} - CI_DESIRED_RUNTIME: crun TEST_FLAVOR: build clone_script: *full_clone prebuild_script: *prebuild @@ -680,12 +677,10 @@ container_integration_test_task: DISTRO_NV: ${FEDORA_NAME} VM_IMAGE_NAME: ${FEDORA_CACHE_IMAGE_NAME} CTR_FQIN: ${FEDORA_CONTAINER_FQIN} - CI_DESIRED_RUNTIME: crun - env: DISTRO_NV: ${PRIOR_FEDORA_NAME} VM_IMAGE_NAME: ${PRIOR_FEDORA_CACHE_IMAGE_NAME} CTR_FQIN: ${PRIOR_FEDORA_CONTAINER_FQIN} - CI_DESIRED_RUNTIME: crun CI_DESIRED_DATABASE: boltdb gce_instance: *standardvm timeout_in: 50m @@ -899,7 +894,6 @@ rootless_remote_system_test_task: # Not used here, is used in other tasks VM_IMAGE_NAME: ${FEDORA_CACHE_IMAGE_NAME} CTR_FQIN: ${FEDORA_CONTAINER_FQIN} - CI_DESIRED_RUNTIME: crun <<: *local_system_test_task alias: rootless_remote_system_test gce_instance: *standardvm diff --git a/test/e2e/container_iface_name_test.go b/test/e2e/container_iface_name_test.go index d9f059f9bab7..a0030b94e8e4 100644 --- a/test/e2e/container_iface_name_test.go +++ b/test/e2e/container_iface_name_test.go @@ -9,13 +9,10 @@ import ( . "github.com/onsi/gomega" ) -func isDebianRunc(pTest *PodmanTestIntegration) bool { +// FIXME 2024-05-14: "Debian" here is a proxy for "netavark < 1.10" +func isDebian() bool { info := GetHostDistributionInfo() - if info.Distribution == "debian" && pTest.OCIRuntime == "runc" { - return true - } - - return false + return info.Distribution == "debian" } func createNetworkDevice(name string) { @@ -104,7 +101,7 @@ var _ = Describe("Podman container interface name", func() { } for _, driverType := range []string{"macvlan", "ipvlan"} { - if driverType == "ipvlan" && isDebianRunc(podmanTest) { + if driverType == "ipvlan" && isDebian() { GinkgoWriter.Println("FIXME: Fails with netavark < 1.10. Re-enable once Debian gets an update") continue } @@ -157,7 +154,7 @@ var _ = Describe("Podman container interface name", func() { SkipIfRootless("cannot create network device in rootless mode.") for _, driverType := range []string{"macvlan", "ipvlan"} { - if driverType == "ipvlan" && isDebianRunc(podmanTest) { + if driverType == "ipvlan" && isDebian() { GinkgoWriter.Println("FIXME: Fails with netavark < 1.10. Re-enable once Debian gets an update") continue } @@ -223,7 +220,7 @@ var _ = Describe("Podman container interface name", func() { createContainersConfFileWithDeviceIfaceName(podmanTest) for _, driverType := range []string{"macvlan", "ipvlan"} { - if driverType == "ipvlan" && isDebianRunc(podmanTest) { + if driverType == "ipvlan" && isDebian() { GinkgoWriter.Println("FIXME: Fails with netavark < 1.10. Re-enable once Debian gets an update") continue } diff --git a/test/e2e/update_test.go b/test/e2e/update_test.go index 83ee481c3f1b..8c936859e08a 100644 --- a/test/e2e/update_test.go +++ b/test/e2e/update_test.go @@ -1,6 +1,8 @@ package integration import ( + "os" + "github.com/containers/common/pkg/cgroupv2" . "github.com/containers/podman/v5/test/utils" . "github.com/onsi/ginkgo/v2" @@ -116,7 +118,12 @@ var _ = Describe("Podman update", func() { podmanTest.CheckFileInContainerSubstring(ctrID, "/sys/fs/cgroup/cpu.max", "500000") // checking blkio weight - podmanTest.CheckFileInContainerSubstring(ctrID, "/sys/fs/cgroup/io.bfq.weight", "123") + if _, err := os.Stat("/sys/fs/cgroup/system.slice/io.bfq.weight"); err == nil { + session = podmanTest.Podman([]string{"exec", ctrID, "cat", "/sys/fs/cgroup/io.bfq.weight"}) + session.WaitWithDefaultTimeout() + Expect(session).Should(ExitCleanly()) + Expect(session.OutputToString()).Should(ContainSubstring("123")) + } // checking device-read/write-bps/iops podmanTest.CheckFileInContainerSubstring(ctrID, "/sys/fs/cgroup/io.max", "rbps=10485760 wbps=10485760 riops=1000 wiops=1000") diff --git a/test/system/260-sdnotify.bats b/test/system/260-sdnotify.bats index fb7cb39f5819..8d37bd8fbaad 100644 --- a/test/system/260-sdnotify.bats +++ b/test/system/260-sdnotify.bats @@ -567,7 +567,22 @@ READY=1" "podman-system-service sends expected data over NOTIFY_SOCKET" assert "$output" !~ "EXTEND_TIMEOUT_USEC=" # Give the system-service 5sec to terminate before killing it. - /bin/kill --timeout 5000 KILL --signal TERM $mainpid + kill -TERM $mainpid + timeout=5 + while :;do + if ! kill -0 $mainpid; then + # Yay, it's gone + break + fi + + timeout=$((timeout - 1)) + if [[ $timeout -eq 0 ]]; then + kill -KILL $mainpid + break + fi + sleep 1 + done + run_podman rmi $image_on_local_registry _stop_socat } diff --git a/test/system/280-update.bats b/test/system/280-update.bats index db335d0af1bb..b1ea6c717b71 100644 --- a/test/system/280-update.bats +++ b/test/system/280-update.bats @@ -90,6 +90,7 @@ device-write-iops = /dev/zero:4000 | - | - fi fi + # Determine the "path = newvalue" string for this cgroup tuple=$cgv1 if is_cgroupsv2; then tuple=$cgv2 @@ -99,6 +100,13 @@ device-write-iops = /dev/zero:4000 | - | - continue fi + # Sigh. bfq doesn't exist on Debian (2024-03) + read path op expect <<<"$tuple" + if [[ ! -e /sys/fs/cgroup/$path ]]; then + echo "[ skipping --$opt : /sys/fs/cgroup/$path does not exist ]" + continue + fi + # OK: setting is applicable. Preserve it. (First removing whitespace) opt=${opt// /} opts+=("--$opt") diff --git a/test/system/520-checkpoint.bats b/test/system/520-checkpoint.bats index 31b5b9af0c1c..219ff175c746 100644 --- a/test/system/520-checkpoint.bats +++ b/test/system/520-checkpoint.bats @@ -22,6 +22,14 @@ function setup() { skip "checkpoint does not work rootless" fi + # As of 2024-05, crun on Debian is not built with criu support: + # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1008249 + runtime=$(podman_runtime) + run $runtime checkpoint --help + if [[ $status -ne 0 ]]; then + skip "runtime $runtime does not support checkpoint/restore" + fi + basic_setup }