Skip to content

Commit 5b18d6e

Browse files
authored
[fast-reboot] save fast-reboot state into the db
Fixes sonic-net/sonic-buildimage#4006 1. save fast-reboot state into the db(aligned with sonic-net/sonic-buildimage#3741) 2. `sonic-buildimage/files/scripts/syncd.sh` could detect the FAST reboot type by the saved fast-reboot state, and request syncd to fast shutdown.
1 parent 0bdc3fd commit 5b18d6e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

scripts/fast-reboot

+3
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ function clear_fast_boot()
9696
{
9797
debug "${REBOOT_TYPE} failure ($?) cleanup ..."
9898

99+
/usr/bin/redis-cli -n 6 del "FAST_REBOOT|system" > /dev/null || /bin/true
100+
99101
/sbin/kexec -u || /bin/true
100102

101103
teardown_control_plane_assistant
@@ -307,6 +309,7 @@ BOOT_TYPE_ARG="cold"
307309
case "$REBOOT_TYPE" in
308310
"fast-reboot")
309311
BOOT_TYPE_ARG=$REBOOT_TYPE
312+
/usr/bin/redis-cli -n 6 set "FAST_REBOOT|system" "1" > /dev/null
310313
trap clear_fast_boot EXIT HUP INT QUIT TERM KILL ABRT ALRM
311314
;;
312315
"warm-reboot")

0 commit comments

Comments
 (0)