[swss]: flush asic db in swss.sh for non warm-boot (#2582)

need to flush asic db in swss.sh instead of syncd.sh

orchagent might already started in swss.sh and put commands
into asic db before asic db is flushed in syncd.sh. This
causes race condition such as INIT_VIEW not passing to syncd.

Signed-off-by: Guohan Lu <gulv@microsoft.com>
This commit is contained in:
lguohan 2019-02-19 21:48:43 -08:00 committed by GitHub
parent f012aab070
commit 572db1e0a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 5 deletions

View File

@ -91,8 +91,9 @@ start() {
# Don't flush DB during warm boot # Don't flush DB during warm boot
if [[ x"$WARM_BOOT" != x"true" ]]; then if [[ x"$WARM_BOOT" != x"true" ]]; then
debug "Flushing databases ..." debug "Flushing APP, ASIC, COUNTER, CONFIG, and partial STATE databases ..."
/usr/bin/docker exec database redis-cli -n 0 FLUSHDB /usr/bin/docker exec database redis-cli -n 0 FLUSHDB
/usr/bin/docker exec database redis-cli -n 1 FLUSHDB
/usr/bin/docker exec database redis-cli -n 2 FLUSHDB /usr/bin/docker exec database redis-cli -n 2 FLUSHDB
/usr/bin/docker exec database redis-cli -n 5 FLUSHDB /usr/bin/docker exec database redis-cli -n 5 FLUSHDB
clean_up_tables 6 "'PORT_TABLE*', 'MGMT_PORT_TABLE*', 'VLAN_TABLE*', 'VLAN_MEMBER_TABLE*', 'INTERFACE_TABLE*', 'MIRROR_SESSION*', 'VRF_TABLE*'" clean_up_tables 6 "'PORT_TABLE*', 'MGMT_PORT_TABLE*', 'VLAN_TABLE*', 'VLAN_MEMBER_TABLE*', 'INTERFACE_TABLE*', 'MIRROR_SESSION*', 'VRF_TABLE*'"

View File

@ -88,10 +88,6 @@ start() {
touch /host/warmboot/warm-starting touch /host/warmboot/warm-starting
else else
rm -f /host/warmboot/warm-starting rm -f /host/warmboot/warm-starting
# Flush ASIC DB during non-warm start
debug "Flushing ASIC database ..."
/usr/bin/docker exec database redis-cli -n 1 FLUSHDB
fi fi
# platform specific tasks # platform specific tasks