From 726a6ceca547517daef0157ce6668069706fe467 Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Sun, 30 Sep 2018 16:16:05 -0400 Subject: [PATCH] Fix a bug --- router-daemon/pvcrd/Daemon.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/router-daemon/pvcrd/Daemon.py b/router-daemon/pvcrd/Daemon.py index dac34fbb..ffaeb45a 100644 --- a/router-daemon/pvcrd/Daemon.py +++ b/router-daemon/pvcrd/Daemon.py @@ -238,9 +238,11 @@ def updatenetworks(new_network_list): for network in new_network_list: if not network in s_network: s_network[network] = VXNetworkInstance.VXNetworkInstance(network, zk_conn, config, t_router[myhostname]) + for network in network_list: if not network in new_network_list: - s_network[network].stopDHCPServer() - s_network[network].removeGatewayAddress() + if this_router.network_state == 'primary': + s_network[network].stopDHCPServer() + s_network[network].removeGatewayAddress() s_network[network].removeNetwork() for router in router_list: if router in t_router: