diff --git a/scripts/image-builder/config/kickstart.ks.template b/scripts/image-builder/config/kickstart.ks.template index ed50600271..a311de51aa 100644 --- a/scripts/image-builder/config/kickstart.ks.template +++ b/scripts/image-builder/config/kickstart.ks.template @@ -99,4 +99,11 @@ if ostree remote show-url edge | grep -q '^file:///var/lib/ostree-local' ; then ostree summary --repo ${ostree_repo}/repo --update fi -%end +# Disable a timer that sets boot_success to 1 after two minutes from a user login. +# It impacts greenboot checks because grub script decrementing boot_counter works +# only if boot_success is 0 (see /etc/grub.d/08_fallback_counting). In case of a +# user login, this results in more than requested amount of red-boot-induced reboots +# and system needing much more time to roll back. +ln -sf /dev/null /etc/systemd/user/grub-boot-success.timer + +%end \ No newline at end of file diff --git a/test/kickstart-templates/kickstart.ks.template b/test/kickstart-templates/kickstart.ks.template index 8eaf26b018..8ac3134c49 100644 --- a/test/kickstart-templates/kickstart.ks.template +++ b/test/kickstart-templates/kickstart.ks.template @@ -89,4 +89,11 @@ for uuid in $(nmcli -f uuid,type,autoconnect connection | awk '$2 == "ethernet" sed -i '/autoconnect=.*/d' "${file}" done +# Disable a timer that sets boot_success to 1 after two minutes from a user login. +# It impacts greenboot checks because grub script decrementing boot_counter works +# only if boot_success is 0 (see /etc/grub.d/08_fallback_counting). In case of a +# user login, this results in more than requested amount of red-boot-induced reboots +# and system needing much more time to roll back. +ln -sf /dev/null /etc/systemd/user/grub-boot-success.timer + %end \ No newline at end of file diff --git a/test/resources/ostree.resource b/test/resources/ostree.resource index d3629a9a8b..0efdc4b9ba 100644 --- a/test/resources/ostree.resource +++ b/test/resources/ostree.resource @@ -66,21 +66,6 @@ System Is Running Right Ref And Healthy Greenboot Health Check Exited System Should Be Healthy -Mask Grub Boot Success Timer - [Documentation] Effectively disable a timer that sets boot_success - ... to 1 after two minutes from user login. - ... It impacts tests because grub's script to decrement boot_counter - ... works only if boot_success is 0 (see /etc/grub.d/08_fallback_counting) - ... resulting in more than requested amount of redboot induced reboots - ... and system needing much more time to roll back. - ${out} ${err} ${rc}= Execute Command - ... systemctl --user mask grub-boot-success.timer - ... return_stdout=True - ... return_stderr=True - ... return_rc=True - - Should Be Equal As Integers ${rc} 0 - Wait For Transaction To End [Documentation] Wait for any ostree transaction to end. ... When grub boots previous deployment due to greenboot failure, diff --git a/test/suites-ostree/fdo.robot b/test/suites-ostree/fdo.robot index 09e2ddff54..597f87425c 100644 --- a/test/suites-ostree/fdo.robot +++ b/test/suites-ostree/fdo.robot @@ -28,7 +28,6 @@ FIDO Onboarding Device ... MicroShift data, unhealthy stored in health file, ... and a deployment gap (no-microshift rollback). - Mask Grub Boot Success Timer System Should Not Feature MicroShift TestAgent.Add Action For Next Deployment every fail_greenboot Deploy Commit Expecting A Rollback ${FAILING_REF}