From dedd5624a06aaae81425b9c03714f6801e7b6251 Mon Sep 17 00:00:00 2001 From: Jipan Yang Date: Tue, 2 Oct 2018 06:08:26 -0700 Subject: [PATCH] =?UTF-8?q?Adapt=20to=20the=20new=20WARM=5FRESTART=5FTABLE?= =?UTF-8?q?=20table=20schema:=20change=20from=20restart=E2=80=A6=20(#2083)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Adapt to the new WARM_RESTART_TABLE table schema: change from restart_count to restore_count Signed-off-by: Jipan Yang * Update variable and function name to match restore_count name change Signed-off-by: Jipan Yang * Update swss submodule for warm restart schema change Signed-off-by: Jipan Yang --- dockers/docker-orchagent/swssconfig.sh | 4 ++-- files/scripts/swss.sh | 8 ++++---- src/sonic-swss | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dockers/docker-orchagent/swssconfig.sh b/dockers/docker-orchagent/swssconfig.sh index 7188703d23..c6915f0597 100755 --- a/dockers/docker-orchagent/swssconfig.sh +++ b/dockers/docker-orchagent/swssconfig.sh @@ -47,8 +47,8 @@ SYSTEM_WARM_START=`redis-cli -n 4 hget "WARM_RESTART|system" enable` SWSS_WARM_START=`redis-cli -n 4 hget "WARM_RESTART|swss" enable` if [[ "$SYSTEM_WARM_START" == "true" ]] || [[ "$SWSS_WARM_START" == "true" ]]; then # We have to make sure db data has not been flushed. - RESTART_COUNT=`redis-cli -n 6 hget "WARM_RESTART_TABLE|orchagent" restart_count` - if [[ -n "$RESTART_COUNT" ]] && [[ "$RESTART_COUNT" != "0" ]]; then + RESTORE_COUNT=`redis-cli -n 6 hget "WARM_RESTART_TABLE|orchagent" restore_count` + if [[ -n "$RESTORE_COUNT" ]] && [[ "$RESTORE_COUNT" != "0" ]]; then exit 0 fi fi diff --git a/files/scripts/swss.sh b/files/scripts/swss.sh index 22f1f0d668..f7fe1a5510 100755 --- a/files/scripts/swss.sh +++ b/files/scripts/swss.sh @@ -38,12 +38,12 @@ function check_warm_boot() fi } -function validate_restart_count() +function validate_restore_count() { if [[ x"$WARM_BOOT" == x"true" ]]; then - RESTART_COUNT=`/usr/bin/redis-cli -n 6 hget "WARM_RESTART_TABLE|orchagent" restart_count` + RESTORE_COUNT=`/usr/bin/redis-cli -n 6 hget "WARM_RESTART_TABLE|orchagent" restore_count` # We have to make sure db data has not been flushed. - if [[ -z "$RESTART_COUNT" ]]; then + if [[ -z "$RESTORE_COUNT" ]]; then WARM_BOOT="false" fi fi @@ -69,7 +69,7 @@ start() { wait_for_database_service check_warm_boot - validate_restart_count + validate_restore_count debug "Warm boot flag: ${SERVICE} ${WARM_BOOT}." diff --git a/src/sonic-swss b/src/sonic-swss index 13df5a98d4..f13aaed9f2 160000 --- a/src/sonic-swss +++ b/src/sonic-swss @@ -1 +1 @@ -Subproject commit 13df5a98d4a6375a778b6216cff886a0c474aa9a +Subproject commit f13aaed9f21f457419e96a5d28a52d319fbee9ed