From 9d64ce761f660f5a78e6beffe6790ff0ef118972 Mon Sep 17 00:00:00 2001 From: Ying Xie Date: Wed, 24 Jul 2019 09:59:47 -0700 Subject: [PATCH] [warm reboot] save configuration after warm reboot (#3200) * [warm reboot] save configuration after warm reboot After warm reboot, save a copy of in memory database to config_db.json, upgrade procedure might have removed config_db.json to force new image to reload minigraph. However, reload minigraph is skipped during warm reboot. Missing config_db.json would cause device to fault in next non-upgrading cold/fast reboot. Signed-off-by: Ying Xie * Update finalize-warmboot.sh --- files/image_config/warmboot-finalizer/finalize-warmboot.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/files/image_config/warmboot-finalizer/finalize-warmboot.sh b/files/image_config/warmboot-finalizer/finalize-warmboot.sh index 653a00291f..00e4e1b7f3 100755 --- a/files/image_config/warmboot-finalizer/finalize-warmboot.sh +++ b/files/image_config/warmboot-finalizer/finalize-warmboot.sh @@ -78,6 +78,11 @@ if [[ x"${WARM_BOOT}" != x"true" ]]; then exit 0 fi +# No need to wait for the reconciliation process. Database has been loaded +# and migrated. This is good enough to save a copy. +debug "Save in-memory database after warm reboot ..." +config save -y + list=${COMP_LIST} # Wait up to 5 minutes