Skip to content

Commit 05c8e33

Browse files
authored
Replace hard-coded fast-reboot with variable. And some typo corrections (sonic-net#1254)
Cosmetic fix: One of the logging statements during warm-reboot incorrectly prints fast-reboot. Fixes sonic-net#5980 Fix: Remove hard-coded fast-reboot with REBOOT_TYPE variable. Additionally, corrected a few typos found in the comments.
1 parent 9d55082 commit 05c8e33

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

scripts/fast-reboot

+7-7
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ function clear_warm_boot()
128128
129129
function init_warm_reboot_states()
130130
{
131-
# If the current running instanace was booted up with warm reboot. Then
131+
# If the current running instance was booted up with warm reboot. Then
132132
# the current DB contents will likely mark warm reboot is done.
133133
# Clear these states so that the next boot up image won't get confused.
134134
if [[ "$REBOOT_TYPE" = "warm-reboot" || "$REBOOT_TYPE" = "fastfast-reboot" ]]; then
@@ -472,8 +472,8 @@ setup_control_plane_assistant
472472
if [[ "$REBOOT_TYPE" = "warm-reboot" || "$REBOOT_TYPE" = "fastfast-reboot" ]]; then
473473
# Freeze orchagent for warm restart
474474
# Ask orchagent_restart_check to try freeze 5 times with interval of 2 seconds,
475-
# it is possible that the orchagent is in transient state and no opportunity to be freezed
476-
# Note: assume that 2*5 seconds is enough for orchagent to process the request and respone freeze or not
475+
# it is possible that the orchagent is in transient state and no opportunity to freeze
476+
# Note: assume that 2*5 seconds is enough for orchagent to process the request and response to freeze or not
477477
debug "Pausing orchagent ..."
478478
docker exec -i swss /usr/bin/orchagent_restart_check -w 2000 -r 5 > /dev/null || RESTARTCHECK_RC=$?
479479
if [[ RESTARTCHECK_RC -ne 0 ]]; then
@@ -486,12 +486,12 @@ if [[ "$REBOOT_TYPE" = "warm-reboot" || "$REBOOT_TYPE" = "fastfast-reboot" ]]; t
486486
fi
487487
fi
488488
489-
# We are fully committed to reboot from this point on becasue critical
489+
# We are fully committed to reboot from this point on because critical
490490
# service will go down and we cannot recover from it.
491491
set +e
492492
493493
if [ -x ${LOG_SSD_HEALTH} ]; then
494-
debug "Collecting logs to check ssd health before fast-reboot..."
494+
debug "Collecting logs to check ssd health before ${REBOOT_TYPE}..."
495495
${LOG_SSD_HEALTH}
496496
fi
497497
@@ -503,7 +503,7 @@ docker kill nat > /dev/null || true
503503
systemctl stop nat
504504
debug "Stopped nat ..."
505505
506-
# Kill radv before stopping BGP service to prevent annoucing our departure.
506+
# Kill radv before stopping BGP service to prevent announcing our departure.
507507
debug "Stopping radv service..."
508508
systemctl stop radv
509509
debug "Stopped radv service..."
@@ -660,7 +660,7 @@ if [ -x ${DEVPATH}/${PLATFORM}/${PLATFORM_PLUGIN} ]; then
660660
${DEVPATH}/${PLATFORM}/${PLATFORM_PLUGIN}
661661
fi
662662
663-
# Reboot: explicity call Linux native reboot under sbin
663+
# Reboot: explicitly call Linux native reboot under sbin
664664
debug "Rebooting with ${REBOOT_METHOD} to ${NEXT_SONIC_IMAGE} ..."
665665
exec ${REBOOT_METHOD}
666666

0 commit comments

Comments
 (0)