From 9bc844985de9e8bbd7ffe88e89db5fdc06a617a9 Mon Sep 17 00:00:00 2001 From: Luke Yang Date: Wed, 26 Jun 2024 16:32:17 -0400 Subject: [PATCH] wip --- tests/integration/image-install-upgrade.sh | 51 +++++++++++++++++----- 1 file changed, 40 insertions(+), 11 deletions(-) diff --git a/tests/integration/image-install-upgrade.sh b/tests/integration/image-install-upgrade.sh index 410e97f57..449de5636 100755 --- a/tests/integration/image-install-upgrade.sh +++ b/tests/integration/image-install-upgrade.sh @@ -96,7 +96,7 @@ RUN cat <> /usr/lib/bootc/install/00-mitigations.toml [install.filesystem.root] type = "xfs" [install] -kargs = ["mitigations=off"] +kargs = ["mitigations=on", "nosmt"] EOF REALEOF @@ -201,17 +201,49 @@ 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=off" \ + -e kargs="mitigations=on,nosmt" \ playbooks/check-system.yaml greenprint "Create upgrade Containerfile" tee "$UPGRADE_CONTAINERFILE" > /dev/null << REALEOF FROM "$TEST_IMAGE_URL" +RUN dnf -y install wget && \ + dnf -y clean all +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 "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" \ + -e kargs="systemd.unified_cgroup_hierarchy=0" \ + 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=1"] +kargs = ["systemd.unified_cgroup_hierarchy=0","console=ttyS0"] EOF REALEOF @@ -232,15 +264,17 @@ 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=1" \ + -e kargs="systemd.unified_cgroup_hierarchy=0,console=ttyS0" \ 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=0"] +kargs = ["systemd.unified_cgroup_hierarchy=1","console=ttyS"] EOF REALEOF @@ -261,14 +295,9 @@ 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" \ + -e kargs="systemd.unified_cgroup_hierarchy=1,console=ttyS" \ playbooks/check-system.yaml -greenprint "Rollback $TEST_OS system" -ansible-playbook -v \ - -i "$INVENTORY_FILE" \ - playbooks/rollback.yaml - greenprint "Terminate $PLATFORM instance and deregister AMI" ansible-playbook -v \ -i "$INVENTORY_FILE" \