Skip to content

Commit a853da9

Browse files
abdosisanthosh-kt
authored andcommitted
Fix the issue as reported in (sonic-net#5315)
sonic-net#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.
1 parent 58dcbf1 commit a853da9

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

dockers/docker-orchagent/swssconfig.sh

+1-5
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,7 @@ HWSKU=${HWSKU:-`sonic-cfggen -d -v "DEVICE_METADATA['localhost']['hwsku']"`}
4949
SYSTEM_WARM_START=`sonic-db-cli STATE_DB hget "WARM_RESTART_ENABLE_TABLE|system" enable`
5050
SWSS_WARM_START=`sonic-db-cli STATE_DB hget "WARM_RESTART_ENABLE_TABLE|swss" enable`
5151
if [[ "$SYSTEM_WARM_START" == "true" ]] || [[ "$SWSS_WARM_START" == "true" ]]; then
52-
# We have to make sure db data has not been flushed.
53-
RESTORE_COUNT=`sonic-db-cli STATE_DB hget "WARM_RESTART_TABLE|orchagent" restore_count`
54-
if [[ -n "$RESTORE_COUNT" ]] && [[ "$RESTORE_COUNT" != "0" ]]; then
55-
exit 0
56-
fi
52+
exit 0
5753
fi
5854

5955
SWSSCONFIG_ARGS="00-copp.config.json ipinip.json ports.json switch.json "

0 commit comments

Comments
 (0)