Skip to content

Commit 5d37671

Browse files
committed
Stabilize auto-recovery-extra test cases for QE env
1 parent 1ef3eb4 commit 5d37671

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,12 @@
11
[Unit]
22
OnFailure=microshift-auto-recovery.service
3+
# Increase StartLimitInterval from default 10s to 25s to accomodate slower systems.
4+
# Systemd will mark service as failed when it restarts StartLimitBurst amount
5+
# (default is 5) within specified StartLimitInterval.
6+
# In CI env, MicroShift restarts within ~1.3 seconds from a start, so 5 restarts
7+
# fit in 10 seconds.
8+
# In QE env, MicroShift needed around ~2.5 seconds to restart, so the
9+
# StartLimitBurst (5) wasn't reached within 10 seconds. That resulted in systemd
10+
# never marking microshift.service as failed (it kept restarting several hundred times)
11+
# and the OnFailure= service not getting triggered.
12+
StartLimitIntervalSec=25s

test/assets/auto-recovery/red-script.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,9 @@ else
2424
fi
2525

2626
echo "System is unhealthy and greenboot's 'deployment testing' procedure is not active - running auto-recovery for MicroShift"
27+
28+
echo "Making sure MicroShift is stopped and doesn't restart preventing from restoring the backup."
29+
systemctl stop microshift
30+
2731
microshift restore --auto-recovery /var/lib/microshift-auto-recovery
2832
systemctl reboot

0 commit comments

Comments
 (0)