From 60f782d542376ec3dc511dcd481c1ae5e6b3b9d7 Mon Sep 17 00:00:00 2001 From: Luke Yang Date: Tue, 2 Jul 2024 09:37:26 -0400 Subject: [PATCH] wip --- tests/integration/image-install-upgrade.sh | 59 ++++------------------ 1 file changed, 10 insertions(+), 49 deletions(-) diff --git a/tests/integration/image-install-upgrade.sh b/tests/integration/image-install-upgrade.sh index df88cb30f..4d397ef1f 100755 --- a/tests/integration/image-install-upgrade.sh +++ b/tests/integration/image-install-upgrade.sh @@ -98,6 +98,10 @@ type = "xfs" [install] kargs = ["mitigations=on", "nosmt"] EOF +RUN mkdir -p /usr/lib/bootc/kargs.d +RUN cat <> /usr/lib/bootc/kargs.d/01-console.toml +kargs = ["systemd.unified_cgroup_hierarchy=0","console=ttyS0","panic=0"] +EOF REALEOF greenprint "Check $TEST_OS installation Containerfile" @@ -202,48 +206,17 @@ ansible-playbook -v \ -e test_os="$TEST_OS" \ -e bootc_image="$TEST_IMAGE_URL" \ -e image_label_version_id="$REDHAT_VERSION_ID" \ - -e kargs="mitigations=on,nosmt" \ + -e kargs="mitigations=on,nosmt,systemd.unified_cgroup_hierarchy=0,console=ttyS0,panic=0" \ playbooks/check-system.yaml greenprint "Create upgrade Containerfile" -tee "$UPGRADE_CONTAINERFILE" > /dev/null << EOF -FROM "$TEST_IMAGE_URL" -RUN dnf -y install wget && \ - dnf -y clean all -EOF - -greenprint "Build $TEST_OS upgrade container image" -sudo podman build --tls-verify=false --retry=5 --retry-delay=10 -t "${TEST_IMAGE_NAME}:${QUAY_REPO_TAG}" -f "$UPGRADE_CONTAINERFILE" . -greenprint "Push $TEST_OS upgrade container image" -sudo podman push --tls-verify=false --quiet "${TEST_IMAGE_NAME}:${QUAY_REPO_TAG}" "$TEST_IMAGE_URL" - -greenprint "Upgrade $TEST_OS system" -ansible-playbook -v \ - -i "$INVENTORY_FILE" \ - playbooks/upgrade.yaml - -greenprint "Run ostree checking test after upgrade on $PLATFORM instance" -ansible-playbook -v \ - -i "$INVENTORY_FILE" \ - -e test_os="$TEST_OS" \ - -e bootc_image="$TEST_IMAGE_URL" \ - -e image_label_version_id="$REDHAT_VERSION_ID" \ - -e upgrade="true" \ - playbooks/check-system.yaml - -greenprint "Rollback $TEST_OS system" -ansible-playbook -v \ - -i "$INVENTORY_FILE" \ - playbooks/rollback.yaml - -greenprint "Create upgrade Containerfile with kargs" tee "$UPGRADE_CONTAINERFILE" > /dev/null << REALEOF FROM "$TEST_IMAGE_URL" RUN dnf -y install wget && \ dnf -y clean all RUN mkdir -p /usr/lib/bootc/kargs.d RUN cat <> /usr/lib/bootc/kargs.d/01-console.toml -kargs = ["systemd.unified_cgroup_hierarchy=0","console=ttyS0","panic=0"] +kargs = ["systemd.unified_cgroup_hierarchy=1","console=ttyS","panic=0"] EOF REALEOF @@ -264,24 +237,12 @@ ansible-playbook -v \ -e bootc_image="$TEST_IMAGE_URL" \ -e image_label_version_id="$REDHAT_VERSION_ID" \ -e upgrade="true" \ - -e kargs="systemd.unified_cgroup_hierarchy=0,console=ttyS0,panic=0" \ playbooks/check-system.yaml -greenprint "Create second upgrade Containerfile to test kargs delta" -tee "$UPGRADE_CONTAINERFILE" > /dev/null << REALEOF -FROM "$TEST_IMAGE_URL" -RUN dnf -y install wget && \ - dnf -y clean all -RUN mkdir -p /usr/lib/bootc/kargs.d -RUN cat <> /usr/lib/bootc/kargs.d/01-console.toml -kargs = ["systemd.unified_cgroup_hierarchy=1","console=ttyS","panic=0"] -EOF -REALEOF - -greenprint "Build $TEST_OS upgrade container image" -sudo podman build --tls-verify=false --retry=5 --retry-delay=10 -t "${TEST_IMAGE_NAME}:${QUAY_REPO_TAG}" -f "$UPGRADE_CONTAINERFILE" . -greenprint "Push $TEST_OS upgrade container image" -sudo podman push --tls-verify=false --quiet "${TEST_IMAGE_NAME}:${QUAY_REPO_TAG}" "$TEST_IMAGE_URL" +greenprint "Rollback $TEST_OS system" +ansible-playbook -v \ + -i "$INVENTORY_FILE" \ + playbooks/rollback.yaml greenprint "Upgrade $TEST_OS system" ansible-playbook -v \