Skip to content

Commit

Permalink
Flush RESTAPI db in fast-reboot shutdown path (sonic-net#2917)
Browse files Browse the repository at this point in the history
* Flush RESTAPI db in fast-reboot shutdown path
  • Loading branch information
bingwang-ms authored and rajkumar38 committed Jul 25, 2023
1 parent d636957 commit 89f889d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/fast-reboot
Original file line number Diff line number Diff line change
Expand Up @@ -793,6 +793,11 @@ for service in ${SERVICES_TO_STOP}; do
sonic-db-cli FLEX_COUNTER_DB FLUSHDB > /dev/null
fi
if [[ "$REBOOT_TYPE" = "fast-reboot" ]]; then
# Flush RESTAP_DB in fast-reboot to avoid stale status
sonic-db-cli RESTAPI_DB FLUSHDB > /dev/null
fi
backup_database
fi
Expand Down

0 comments on commit 89f889d

Please sign in to comment.