Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fast reboot] set a fast-reboot DB flag #887

Merged
merged 1 commit into from
Apr 27, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions scripts/fast-reboot
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function parseOptions()
done
}

function clear_fast_boot()
function common_clear()
{
debug "${REBOOT_TYPE} failure ($?) cleanup ..."

Expand All @@ -101,9 +101,16 @@ function clear_fast_boot()
teardown_control_plane_assistant
}

function clear_fast_boot()
{
common_clear

redis-cli -n 6 DEL "FAST_REBOOT|system" &>/dev/null || /bin/true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should use sonic-db-cli

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yxieca can we change this to sonic-db-cli ?

}

function clear_warm_boot()
{
clear_fast_boot
common_clear

result=`timeout 10s config warm_restart disable; if [[ $? == 124 ]]; then echo timeout; else echo "code ($?)"; fi` || /bin/true
debug "Cancel warm-reboot: ${result}"
Expand Down Expand Up @@ -308,6 +315,7 @@ case "$REBOOT_TYPE" in
"fast-reboot")
BOOT_TYPE_ARG=$REBOOT_TYPE
trap clear_fast_boot EXIT HUP INT QUIT TERM KILL ABRT ALRM
redis-cli -n 6 SET "FAST_REBOOT|system" "1" "EX" "180" &>/dev/null
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the same , can we change this to sonic-db-cli ? @yxieca

;;
"warm-reboot")
if [[ "$sonic_asic_type" == "mellanox" ]]; then
Expand Down