Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
lukewarmtemp committed Jun 12, 2024
1 parent b19222c commit 52063f7
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 8 deletions.
31 changes: 30 additions & 1 deletion tests/integration/image-install-upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,14 @@ ansible-playbook -v \
playbooks/check-system.yaml

greenprint "Create upgrade Containerfile"
tee "$UPGRADE_CONTAINERFILE" > /dev/null << EOF
tee "$UPGRADE_CONTAINERFILE" > /dev/null << REALEOF
FROM "$TEST_IMAGE_URL"
RUN dnf -y install wget && \
dnf -y clean all
RUN cat <<EOF >> /usr/lib/bootc/kargs.d/01-console.toml
kargs = ["systemd.unified_cgroup_hierarchy=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" .
Expand All @@ -224,6 +227,32 @@ 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" \
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 cat <<EOF >> /usr/lib/bootc/kargs.d/01-console.toml
kargs = ["systemd.unified_cgroup_hierarchy=1"]
EOF
REALEOF

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=1" \
playbooks/check-system.yaml

greenprint "Rollback $TEST_OS system"
Expand Down
5 changes: 0 additions & 5 deletions tests/integration/install-upgrade.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,3 @@
summary: bootc install to-disk and upgrade test
test: ./image-install-upgrade.sh
duration: 90m

/bootc-kargs:
summary: bootc kargs test
test: ./bootc-kargs.sh
duration: 90m
4 changes: 2 additions & 2 deletions tests/integration/playbooks/check-system.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -455,13 +455,13 @@

# case: check karg
- name: grep for kargs
when: kargs != ''
shell: cat /proc/cmdline | grep $item
with_items: "{{ kargs.split(',') }}"
register: kargs_check
# grep will exit with 1 when no results found.
# This causes the task not to halt play.
ignore_errors: true
when: kargs != ''

- name: check if kargs exist
block:
Expand All @@ -477,7 +477,7 @@
- name: failed count + 1
set_fact:
failed_counter: "{{ failed_counter | int + 1 }}"
when: karg != ''
when: kargs != ''

# case: check reboot times
- name: check reboot times
Expand Down

0 comments on commit 52063f7

Please sign in to comment.