diff --git a/router-daemon/pvcrd/Daemon.py b/router-daemon/pvcrd/Daemon.py index 0802d513..dac34fbb 100644 --- a/router-daemon/pvcrd/Daemon.py +++ b/router-daemon/pvcrd/Daemon.py @@ -239,7 +239,8 @@ def updatenetworks(new_network_list): if not network in s_network: s_network[network] = VXNetworkInstance.VXNetworkInstance(network, zk_conn, config, t_router[myhostname]) if not network in new_network_list: - s_network[network].removeAddress() + s_network[network].stopDHCPServer() + s_network[network].removeGatewayAddress() s_network[network].removeNetwork() for router in router_list: if router in t_router: diff --git a/router-daemon/pvcrd/RouterInstance.py b/router-daemon/pvcrd/RouterInstance.py index f1eedc74..ae25c4df 100644 --- a/router-daemon/pvcrd/RouterInstance.py +++ b/router-daemon/pvcrd/RouterInstance.py @@ -104,8 +104,8 @@ class RouterInstance(): zkhandler.writedata(self.zk_conn, { '/routers/{}/networkstate'.format(self.t_router[router].getname()): 'primary' }) time.sleep(2) for network in self.s_network: - self.s_network[network].removeGatewayAddress() self.s_network[network].stopDHCPServer() + self.s_network[network].removeGatewayAddress() def set_secondary(self): result = zkhandler.writedata(self.zk_conn, {