From 82eb2d3aa74613be9d3c2fb3b74dff68beaaf093 Mon Sep 17 00:00:00 2001 From: Yariv Rachmani Date: Thu, 13 Jun 2024 12:43:04 +0300 Subject: [PATCH] Packit failures w/a There connectivity issues between bluechi-controller and qm-node1 bluechi-agent failing tier-0 tests Adding --tz local for each container Disk selinux container cleanup Signed-off-by: Yariv Rachmani --- .packit.yaml | 2 -- tests/e2e/lib/container | 1 + tests/ffi/common/prepare.sh | 5 +++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.packit.yaml b/.packit.yaml index 156d5173..32c95db7 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -70,8 +70,6 @@ jobs: hardware: disk: - size: ">= 20 GB" - - - job: tests trigger: pull_request identifier: e2e-ffi diff --git a/tests/e2e/lib/container b/tests/e2e/lib/container index 14290acc..0f87f662 100644 --- a/tests/e2e/lib/container +++ b/tests/e2e/lib/container @@ -62,6 +62,7 @@ file: ${container_file} tag: ${container_tag}" # Execute the container eval "$(podman run -d \ --privileged \ + --tz local \ --network podmanDualStack \ --name "${container_name}" \ --hostname "${container_name}" \ diff --git a/tests/ffi/common/prepare.sh b/tests/ffi/common/prepare.sh index d301a3b0..d8566707 100644 --- a/tests/ffi/common/prepare.sh +++ b/tests/ffi/common/prepare.sh @@ -11,7 +11,6 @@ prepare_test() { # Remove 'DropCapability=sys_resource' enable nested container in QM exec_cmd "sed -i 's|DropCapability=sys_resource|#DropCapability=sys_resource|' \ ${qm_service_file}" - exec_cmd "restorecon -RFv /var/lib/containers" # Changing QM score to 1000 to avoid full memory error on SoC if [[ -n "${PACKIT_COPR_PROJECT}" && "${PACKIT_COPR_PROJECT}" == "release" ]]; then exec_cmd "sed -i 's|OOMScoreAdjust.*|OOMScoreAdjust=1000|' ${qm_service_file}" @@ -19,12 +18,13 @@ prepare_test() { } disk_cleanup() { + exec_cmd "podman exec qm bash -c \"podman container cleanup -l\"" exec_cmd "systemctl stop qm" remove_file=$(find /var/qm -size +2G) exec_cmd "rm -f $remove_file" - exec_cmd "systemctl start qm" remove_file=$(find /root -size +1G) exec_cmd "rm -f $remove_file" + exec_cmd "systemctl start qm" } reload_config() { @@ -41,6 +41,7 @@ prepare_images() { exec_cmd "podman push ${image_id} dir:${QM_HOST_REGISTRY_DIR}/tools-ffi:latest" # Remove image to save /var space exec_cmd "podman image rm -f ${image_id}" + exec_cmd "restorecon -RFv /var/lib/containers" fi }