From 89f889d500ceef8492c3b2e07427db069d4b9910 Mon Sep 17 00:00:00 2001 From: bingwang-ms <66248323+bingwang-ms@users.noreply.github.com> Date: Wed, 19 Jul 2023 13:01:40 -0700 Subject: [PATCH] Flush RESTAPI db in fast-reboot shutdown path (#2917) * Flush RESTAPI db in fast-reboot shutdown path --- scripts/fast-reboot | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/fast-reboot b/scripts/fast-reboot index 917449b436..1c47664e09 100755 --- a/scripts/fast-reboot +++ b/scripts/fast-reboot @@ -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