Fix up a few more bugs

This commit is contained in:
Joshua Boniface 2018-11-18 17:29:35 -05:00
parent e71ba42be0
commit a421bde679
3 changed files with 5 additions and 4 deletions

View File

@ -363,8 +363,8 @@ class AXFRDaemonInstance(object):
# Go through the new elements
for newrecord in in_new_not_in_old:
splitnewrecord = newrecord.split()
# If there's a name match with different content, remove the old one
if splitrecord[0] == splitnewrecord[0]:
# If there's a name and type match with different content, remove the old one
if splitrecord[0] == splitnewrecord[0] and splitrecord[3] == splitnewrecord[3]:
remove_records.append(record_id)
changed = False

View File

@ -604,6 +604,7 @@ def update_networks(new_network_list):
if not network in network_list:
d_network[network] = VXNetworkInstance.VXNetworkInstance(network, zk_conn, config, logger, this_node)
print(network)
if config['daemon_mode'] == 'coordinator':
dns_aggregator.add_network(d_network[network])
# Start primary functionality
if this_node.router_state == 'primary':

View File

@ -245,11 +245,11 @@ class NodeInstance(object):
self.logger.out('Setting router {} to secondary state'.format(self.name), state='i')
self.logger.out('Network list: {}'.format(', '.join(self.network_list)))
time.sleep(1)
self.dns_aggregator.stop_aggregator()
for network in self.d_network:
self.d_network[network].stopDHCPServer()
self.d_network[network].removeGateways()
self.removeFloatingAddresses()
self.dns_aggregator.stop_aggregator()
def become_primary(self):
self.logger.out('Setting router {} to primary state.'.format(self.name), state='i')