From 09ebe42c0bcac66e366e5b2ce327ab71b7a37d58 Mon Sep 17 00:00:00 2001 From: Ying Xie Date: Thu, 14 Feb 2019 16:38:01 +0000 Subject: [PATCH] [warm boot] cherry-pick PR #2538 and advance related sub-modules MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR#2538 cannot merge due to master branch status. It has been tested against 201811 branch. Submodule src/sonic-sairedis 21f4a49..d57222a: > Add more specific logic for ingress ACL and buffer profile (#421) > Move warm_restart enable/disable config to stateDB WARM_RESTART_ENABLE_TABLE (#418) > Add support for vlan tagged frames in virtual switch (#417) Submodule src/sonic-swss 1590030..584490c: > Move warm_restart enable/disable config to stateDB WARM_RESTART_ENABLE_TABLE (#786) > [vstest]: Potential fix for timing issue in warm_reboot's routing UT (#788) Submodule src/sonic-swss-common 594f4e8..286ef34: > Move warm_restart enable/disable config to stateDB WARM_RESTART_ENABLE_TABLE (#260) Submodule src/sonic-utilities c6666e2..b44b462: > Move warm_restart enable/disable config to stateDB WARM_RESTART_ENABL… (#458) > [aclshow] output only counters per table/rule (#442) Signed-off-by: Ying Xie [PR 2538] Move warm_restart enable/disable config to stateDB WARM_RESTART_ENABLE_TABLE Signed-off-by: Jipan Yang --- dockers/docker-orchagent/swssconfig.sh | 4 ++-- files/image_config/updategraph/updategraph | 6 +++--- files/scripts/swss.sh | 4 ++-- files/scripts/syncd.sh | 4 ++-- src/sonic-sairedis | 2 +- src/sonic-swss | 2 +- src/sonic-swss-common | 2 +- src/sonic-utilities | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/dockers/docker-orchagent/swssconfig.sh b/dockers/docker-orchagent/swssconfig.sh index c6915f0597a1..c521fadf0a49 100755 --- a/dockers/docker-orchagent/swssconfig.sh +++ b/dockers/docker-orchagent/swssconfig.sh @@ -43,8 +43,8 @@ HWSKU=`sonic-cfggen -d -v "DEVICE_METADATA['localhost']['hwsku']"` # Don't load json config if system warm start or # swss docker warm start is enabled, the data already exists in appDB. -SYSTEM_WARM_START=`redis-cli -n 4 hget "WARM_RESTART|system" enable` -SWSS_WARM_START=`redis-cli -n 4 hget "WARM_RESTART|swss" enable` +SYSTEM_WARM_START=`redis-cli -n 6 hget "WARM_RESTART_ENABLE_TABLE|system" enable` +SWSS_WARM_START=`redis-cli -n 6 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=`redis-cli -n 6 hget "WARM_RESTART_TABLE|orchagent" restore_count` diff --git a/files/image_config/updategraph/updategraph b/files/image_config/updategraph/updategraph index ebeee747b43d..686108727b27 100755 --- a/files/image_config/updategraph/updategraph +++ b/files/image_config/updategraph/updategraph @@ -32,7 +32,7 @@ function copy_config_files_and_directories() function check_system_warm_boot() { - SYSTEM_WARM_START=`/usr/bin/redis-cli -n 4 hget "WARM_RESTART|system" enable` + SYSTEM_WARM_START=`/usr/bin/redis-cli -n 6 hget "WARM_RESTART_ENABLE_TABLE|system" enable` # SYSTEM_WARM_START could be empty, always make WARM_BOOT meaningful. if [[ x"$SYSTEM_WARM_START" == x"true" ]]; then WARM_BOOT="true" @@ -50,7 +50,7 @@ fi . /etc/sonic/updategraph.conf check_system_warm_boot -copy_list="minigraph.xml snmp.yml acl.json config_db.json frr" +copy_list="minigraph.xml snmp.yml acl.json config_db.json frr" if [ -f /tmp/pending_config_migration ]; then copy_config_files_and_directories $copy_list if [ x"${WARM_BOOT}" == x"true" ]; then @@ -71,7 +71,7 @@ fi if [ -f /tmp/pending_config_initialization ]; then rm -f /tmp/pending_config_initialization - if [ "$enabled" != "true" ]; then + if [ "$enabled" != "true" ]; then PLATFORM=`sonic-cfggen -H -v DEVICE_METADATA.localhost.platform` PRESET=(`head -n 1 /usr/share/sonic/device/$PLATFORM/default_sku`) sonic-cfggen -H -k ${PRESET[0]} --preset ${PRESET[1]} > /etc/sonic/config_db.json diff --git a/files/scripts/swss.sh b/files/scripts/swss.sh index cb0bf202b919..cbb7eeaefa82 100755 --- a/files/scripts/swss.sh +++ b/files/scripts/swss.sh @@ -29,8 +29,8 @@ function unlock_service_state_change() function check_warm_boot() { - SYSTEM_WARM_START=`/usr/bin/redis-cli -n 4 hget "WARM_RESTART|system" enable` - SERVICE_WARM_START=`/usr/bin/redis-cli -n 4 hget "WARM_RESTART|${SERVICE}" enable` + SYSTEM_WARM_START=`/usr/bin/redis-cli -n 6 hget "WARM_RESTART_ENABLE_TABLE|system" enable` + SERVICE_WARM_START=`/usr/bin/redis-cli -n 6 hget "WARM_RESTART_ENABLE_TABLE|${SERVICE}" enable` if [[ x"$SYSTEM_WARM_START" == x"true" ]] || [[ x"$SERVICE_WARM_START" == x"true" ]]; then WARM_BOOT="true" else diff --git a/files/scripts/syncd.sh b/files/scripts/syncd.sh index bef8ff11558c..534e393c5358 100755 --- a/files/scripts/syncd.sh +++ b/files/scripts/syncd.sh @@ -29,8 +29,8 @@ function unlock_service_state_change() function check_warm_boot() { - SYSTEM_WARM_START=`/usr/bin/redis-cli -n 4 hget "WARM_RESTART|system" enable` - SERVICE_WARM_START=`/usr/bin/redis-cli -n 4 hget "WARM_RESTART|${SERVICE}" enable` + SYSTEM_WARM_START=`/usr/bin/redis-cli -n 6 hget "WARM_RESTART_ENABLE_TABLE|system" enable` + SERVICE_WARM_START=`/usr/bin/redis-cli -n 6 hget "WARM_RESTART_ENABLE_TABLE|${SERVICE}" enable` # SYSTEM_WARM_START could be empty, always make WARM_BOOT meaningful. if [[ x"$SYSTEM_WARM_START" == x"true" ]] || [[ x"$SERVICE_WARM_START" == x"true" ]]; then WARM_BOOT="true" diff --git a/src/sonic-sairedis b/src/sonic-sairedis index 21f4a495bd1e..d57222a9879b 160000 --- a/src/sonic-sairedis +++ b/src/sonic-sairedis @@ -1 +1 @@ -Subproject commit 21f4a495bd1ef5249af3546a320072d14b1fe2a6 +Subproject commit d57222a9879b9ee28738d05b769b7e0ca5d50cd1 diff --git a/src/sonic-swss b/src/sonic-swss index 1590030e8e16..584490c319be 160000 --- a/src/sonic-swss +++ b/src/sonic-swss @@ -1 +1 @@ -Subproject commit 1590030e8e1668edd5fe8f645a1ae185f34ae9ce +Subproject commit 584490c319be8e74444504538156e30ffadb8c4d diff --git a/src/sonic-swss-common b/src/sonic-swss-common index 594f4e8a8f51..286ef34f18ed 160000 --- a/src/sonic-swss-common +++ b/src/sonic-swss-common @@ -1 +1 @@ -Subproject commit 594f4e8a8f518f0d835942e3508dd82763f45d4d +Subproject commit 286ef34f18ed105532c6b5e0d5fcbc7e1bbd9073 diff --git a/src/sonic-utilities b/src/sonic-utilities index c6666e2bcf94..b44b462a14b9 160000 --- a/src/sonic-utilities +++ b/src/sonic-utilities @@ -1 +1 @@ -Subproject commit c6666e2bcf94cdca1f30d26d7e611f3db9f7e7cf +Subproject commit b44b462a14b9a4b7c2d6091b5355c046acd9dac8