Ensure mDNS sends NOTIFYs on all zone changes
Additionally, add some info and debug logging while sending NOTIFYs Change-Id: I9a330a1d797276b6e2253b934f038ca64ba6bda4
This commit is contained in:
@@ -302,6 +302,7 @@ class Service(service.RPCService):
|
||||
|
||||
# Update SOA record
|
||||
self._update_soa(context, domain)
|
||||
self.mdns_api.notify_zone_changed(context, domain.name)
|
||||
|
||||
return domain
|
||||
|
||||
@@ -784,6 +785,8 @@ class Service(service.RPCService):
|
||||
self._create_ns(context, created_domain, servers)
|
||||
self._create_soa(context, created_domain)
|
||||
|
||||
self.mdns_api.notify_zone_changed(context, created_domain.name)
|
||||
|
||||
return created_domain
|
||||
|
||||
def get_domain(self, context, domain_id):
|
||||
@@ -1105,7 +1108,6 @@ class Service(service.RPCService):
|
||||
|
||||
# Send RecordSet update notification
|
||||
self.notifier.info(context, 'dns.recordset.update', recordset)
|
||||
self.mdns_api.notify_zone_changed(context, domain.name)
|
||||
|
||||
return self._get_priority(recordset)
|
||||
|
||||
@@ -1273,7 +1275,6 @@ class Service(service.RPCService):
|
||||
|
||||
# Send Record update notification
|
||||
self.notifier.info(context, 'dns.record.update', record)
|
||||
self.mdns_api.notify_zone_changed(context, domain.name)
|
||||
|
||||
return record
|
||||
|
||||
|
||||
@@ -62,6 +62,8 @@ class NotifyEndpoint(object):
|
||||
:param zone_name: The zone name for which some data changed.
|
||||
:return: None
|
||||
"""
|
||||
LOG.info(_LI("Sending NOTIFYs for %(zone_name)s") %
|
||||
{'zone_name': zone_name})
|
||||
notify_message = self._get_notify_message(context, zone_name)
|
||||
for current in range(0, self._total_slave_nameservers):
|
||||
retry = -1
|
||||
@@ -69,6 +71,11 @@ class NotifyEndpoint(object):
|
||||
# retry sending NOTIFY if specified by configuration file.
|
||||
while retry < CONF['service:mdns'].notify_retries:
|
||||
retry = retry + 1
|
||||
LOG.debug("Sending NOTIFY for %(zone_name)s to "
|
||||
"%(ip)s:%(port)s" %
|
||||
{'zone_name': zone_name,
|
||||
'ip': self._slave_server_ips[current],
|
||||
'port': self._slave_server_ports[current]})
|
||||
response = self._send_notify_message(
|
||||
context, zone_name, notify_message,
|
||||
self._slave_server_ips[current],
|
||||
|
||||
Reference in New Issue
Block a user