From e564142df216ab35e43d5937e779d080242bf3ac Mon Sep 17 00:00:00 2001 From: abdosi <58047199+abdosi@users.noreply.github.com> Date: Fri, 4 Sep 2020 09:34:26 -0700 Subject: [PATCH] Fix the issue as reported in (#5315) https://github.com/Azure/sonic-buildimage/issues/5255 Root Cause: Waiting on Restore count != 0 can lead to race condition between orchagent process and swssconfig.sh. Ideally check of Restore count != 0 is not needed as the State DB cannot be flushed as if it was flushed then Warm Restart or swss-restart should not be true also. --- dockers/docker-orchagent/swssconfig.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/dockers/docker-orchagent/swssconfig.sh b/dockers/docker-orchagent/swssconfig.sh index 0743d95f8eb6..4c8c1f8b4cdd 100755 --- a/dockers/docker-orchagent/swssconfig.sh +++ b/dockers/docker-orchagent/swssconfig.sh @@ -46,11 +46,7 @@ HWSKU=`sonic-cfggen -d -v "DEVICE_METADATA['localhost']['hwsku']"` SYSTEM_WARM_START=`sonic-db-cli STATE_DB hget "WARM_RESTART_ENABLE_TABLE|system" enable` SWSS_WARM_START=`sonic-db-cli STATE_DB hget "WARM_RESTART_ENABLE_TABLE|swss" enable` if [[ "$SYSTEM_WARM_START" == "true" ]] || [[ "$SWSS_WARM_START" == "true" ]]; then - # We have to make sure db data has not been flushed. - RESTORE_COUNT=`sonic-db-cli STATE_DB hget "WARM_RESTART_TABLE|orchagent" restore_count` - if [[ -n "$RESTORE_COUNT" ]] && [[ "$RESTORE_COUNT" != "0" ]]; then - exit 0 - fi + exit 0 fi SWSSCONFIG_ARGS="00-copp.config.json ipinip.json ports.json switch.json "