Skip to content

Commit 576c9ef

Browse files
[scripts/fast-reboot] stop timers in advance (#2131)
- What I did Service timers may trigger service start in the middle of warm-reboot. Stopping them in advance prevents this issue. - How I did it Stopped all service timers that are part of sonic-delayed.target - How to verify it Run warm-reboot. Signed-off-by: Stepan Blyschak <[email protected]>
1 parent 4dad79c commit 576c9ef

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

scripts/fast-reboot

+7
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,13 @@ if [ -x ${LOG_SSD_HEALTH} ]; then
670670
${LOG_SSD_HEALTH}
671671
fi
672672
673+
# Stop any timers to prevent any containers starting in the middle of the process.
674+
TIMERS=$(systemctl list-dependencies --plain sonic-delayed.target | sed 1d)
675+
for timer in ${TIMERS}; do
676+
debug "Stopping ${timer} ..."
677+
systemctl stop ${timer}
678+
debug "Stopped ${timer} ..."
679+
done
673680
674681
if [[ -f ${SHUTDOWN_ORDER_FILE} ]]; then
675682
SERVICES_TO_STOP="$(cat ${SHUTDOWN_ORDER_FILE})"

0 commit comments

Comments
 (0)