Skip to content

Commit 1260f90

Browse files
authored
[warm-reboot]: Check empty key before issuing redis hget (#1496)
Added a check for empty key before checking WARM_RESTART_ENABLE_TABLE
1 parent 5739cd9 commit 1260f90

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/fast-reboot

+1-1
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ function save_counters_folder() {
392392
393393
function check_warm_restart_in_progress() {
394394
sonic-db-cli STATE_DB keys "WARM_RESTART_ENABLE_TABLE|*" | while read key ; do
395-
if [[ x"$(sonic-db-cli STATE_DB hget $key enable)" == x"true" ]]; then
395+
if [ -n "$key" ] && [[ x"$(sonic-db-cli STATE_DB hget $key enable)" == x"true" ]]; then
396396
if [[ x"${FORCE}" == x"yes" ]]; then
397397
debug "Ignoring warm restart flag for ${key#*|}"
398398
else

0 commit comments

Comments
 (0)