Fix up a few more bugs
This commit is contained in:
parent
e71ba42be0
commit
a421bde679
|
@ -363,8 +363,8 @@ class AXFRDaemonInstance(object):
|
||||||
# Go through the new elements
|
# Go through the new elements
|
||||||
for newrecord in in_new_not_in_old:
|
for newrecord in in_new_not_in_old:
|
||||||
splitnewrecord = newrecord.split()
|
splitnewrecord = newrecord.split()
|
||||||
# If there's a name match with different content, remove the old one
|
# If there's a name and type match with different content, remove the old one
|
||||||
if splitrecord[0] == splitnewrecord[0]:
|
if splitrecord[0] == splitnewrecord[0] and splitrecord[3] == splitnewrecord[3]:
|
||||||
remove_records.append(record_id)
|
remove_records.append(record_id)
|
||||||
|
|
||||||
changed = False
|
changed = False
|
||||||
|
|
|
@ -604,7 +604,8 @@ def update_networks(new_network_list):
|
||||||
if not network in network_list:
|
if not network in network_list:
|
||||||
d_network[network] = VXNetworkInstance.VXNetworkInstance(network, zk_conn, config, logger, this_node)
|
d_network[network] = VXNetworkInstance.VXNetworkInstance(network, zk_conn, config, logger, this_node)
|
||||||
print(network)
|
print(network)
|
||||||
dns_aggregator.add_network(d_network[network])
|
if config['daemon_mode'] == 'coordinator':
|
||||||
|
dns_aggregator.add_network(d_network[network])
|
||||||
# Start primary functionality
|
# Start primary functionality
|
||||||
if this_node.router_state == 'primary':
|
if this_node.router_state == 'primary':
|
||||||
d_network[network].createGateways()
|
d_network[network].createGateways()
|
||||||
|
|
|
@ -245,11 +245,11 @@ class NodeInstance(object):
|
||||||
self.logger.out('Setting router {} to secondary state'.format(self.name), state='i')
|
self.logger.out('Setting router {} to secondary state'.format(self.name), state='i')
|
||||||
self.logger.out('Network list: {}'.format(', '.join(self.network_list)))
|
self.logger.out('Network list: {}'.format(', '.join(self.network_list)))
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
self.dns_aggregator.stop_aggregator()
|
|
||||||
for network in self.d_network:
|
for network in self.d_network:
|
||||||
self.d_network[network].stopDHCPServer()
|
self.d_network[network].stopDHCPServer()
|
||||||
self.d_network[network].removeGateways()
|
self.d_network[network].removeGateways()
|
||||||
self.removeFloatingAddresses()
|
self.removeFloatingAddresses()
|
||||||
|
self.dns_aggregator.stop_aggregator()
|
||||||
|
|
||||||
def become_primary(self):
|
def become_primary(self):
|
||||||
self.logger.out('Setting router {} to primary state.'.format(self.name), state='i')
|
self.logger.out('Setting router {} to primary state.'.format(self.name), state='i')
|
||||||
|
|
Loading…
Reference in New Issue