Skip to content

Commit f7185fd

Browse files
committed
tests/kola: rework reboot-preparation to reduce timeouts
Change it so that the autopkg-reboot-prepare only gets called once all the downloading from the network is done. Else we'll hit the 120 second timeout on reboot often because sometimes it takes a long time to download all the content for a major version rebase.
1 parent 79ab59c commit f7185fd

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

tests/kola/upgrade/extended/test.sh

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -372,11 +372,22 @@ if ! timeout 90s $cmd | grep --max-count=1 'proceeding to stage it'; then
372372
fi
373373
set -o pipefail
374374

375+
# OK update has been initiated. Let's fork off a process that will wait until
376+
# the deployment is written before signaling the impending reboot. Waiting
377+
# before signaling reboot will mean we get less timeouts in the code that
378+
# waits for the reboot to happen.
379+
#
380+
# The strategy of using systemd-run for this was lifted from
381+
# https://github.com/coreos/coreos-assembler/commit/242a88eae7e167efa9e04dcef9b751c6df137333
382+
#
383+
# On <35 SELinux won't allow a path unit to monitor /ostree/deploy, so disable
384+
verlt $version '35.00000000.0.0' && setenforce 0
385+
systemd-run -u refchanged \
386+
--path-property=PathChanged=/ostree/deploy \
387+
bash /tmp/autopkgtest-reboot-prepare $version
375388

376-
# OK update has been initiated, prepare for reboot and loop to show
377-
# status of zincati and rpm-ostreed
378-
/tmp/autopkgtest-reboot-prepare $version
389+
# While we wait, loop to show status of zincati and rpm-ostreed
379390
while true; do
380-
sleep 20
391+
sleep 30
381392
systemctl status rpm-ostreed zincati --lines=0
382393
done

0 commit comments

Comments
 (0)