From 28dc042b77d835d6bdaaa4371fd120e625361289 Mon Sep 17 00:00:00 2001 From: Jipan Yang Date: Sun, 18 Nov 2018 17:05:03 -0800 Subject: [PATCH] Remove default docker name value of swss. (#692) * Remove default docker name value of swss. The default docker name caused a lot of confusion when the libraries used in other dockers Signed-off-by: Jipan Yang * [VS]: fix syncd crash caused by meta_generic_validation_remove reference count error Signed-off-by: Jipan Yang * [vs]: user sysfs to get mac of server eth0 Signed-off-by: Jipan Yang --- cfgmgr/vlanmgrd.cpp | 4 ++-- orchagent/main.cpp | 4 ++-- portsyncd/portsyncd.cpp | 4 ++-- tests/test_warm_reboot.py | 6 ++++-- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/cfgmgr/vlanmgrd.cpp b/cfgmgr/vlanmgrd.cpp index c6757a99b6be..a2bafe02848e 100644 --- a/cfgmgr/vlanmgrd.cpp +++ b/cfgmgr/vlanmgrd.cpp @@ -57,8 +57,8 @@ int main(int argc, char **argv) DBConnector appDb(APPL_DB, DBConnector::DEFAULT_UNIXSOCKET, 0); DBConnector stateDb(STATE_DB, DBConnector::DEFAULT_UNIXSOCKET, 0); - WarmStart::initialize("vlanmgrd"); - WarmStart::checkWarmStart("vlanmgrd"); + WarmStart::initialize("vlanmgrd", "swss"); + WarmStart::checkWarmStart("vlanmgrd", "swss"); /* * swss service starts after interfaces-config.service which will have diff --git a/orchagent/main.cpp b/orchagent/main.cpp index f0bfebed2481..f70ec670b37f 100644 --- a/orchagent/main.cpp +++ b/orchagent/main.cpp @@ -102,8 +102,8 @@ int main(int argc, char **argv) SWSS_LOG_ENTER(); - WarmStart::initialize("orchagent"); - WarmStart::checkWarmStart("orchagent"); + WarmStart::initialize("orchagent", "swss"); + WarmStart::checkWarmStart("orchagent", "swss"); if (signal(SIGHUP, sighup_handler) == SIG_ERR) { diff --git a/portsyncd/portsyncd.cpp b/portsyncd/portsyncd.cpp index 100073b4c890..5475584e9c16 100644 --- a/portsyncd/portsyncd.cpp +++ b/portsyncd/portsyncd.cpp @@ -75,8 +75,8 @@ int main(int argc, char **argv) ProducerStateTable p(&appl_db, APP_PORT_TABLE_NAME); SubscriberStateTable portCfg(&cfgDb, CFG_PORT_TABLE_NAME); - WarmStart::initialize("portsyncd"); - WarmStart::checkWarmStart("portsyncd"); + WarmStart::initialize("portsyncd", "swss"); + WarmStart::checkWarmStart("portsyncd", "swss"); const bool warm = WarmStart::isWarmStart(); LinkSync sync(&appl_db, &state_db); diff --git a/tests/test_warm_reboot.py b/tests/test_warm_reboot.py index 2d2ba7af1fa9..052e63eb3043 100644 --- a/tests/test_warm_reboot.py +++ b/tests/test_warm_reboot.py @@ -741,7 +741,8 @@ def test_OrchagentWarmRestartReadyCheck(dvs, testlog): assert result == "RESTARTCHECK failed\n" # Cleaning previously pushed route-entry to ease life of subsequent testcases. - del_entry_tbl(appl_db, swsscommon.APP_ROUTE_TABLE_NAME, "2.2.2.0/24") + ps._del("2.2.2.0/24") + time.sleep(1) # recover for test cases after this one. dvs.stop_swss() @@ -1521,7 +1522,8 @@ def test_system_warmreboot_neighbor_syncup(dvs, testlog): dvs.runcmd("ip -6 addr add {}00::1/64 dev Ethernet{}".format(i*4,i*4)) dvs.servers[i].runcmd("ip link set up dev eth0") dvs.servers[i].runcmd("ip addr flush dev eth0") - result = dvs.servers[i].runcmd_output("ifconfig eth0 | grep HWaddr | awk '{print $NF}'") + #result = dvs.servers[i].runcmd_output("ifconfig eth0 | grep HWaddr | awk '{print $NF}'") + result = dvs.servers[i].runcmd_output("cat /sys/class/net/eth0/address") macs.append(result.strip()) #