diff --git a/designate/mdns/notify.py b/designate/mdns/notify.py index 87886e765..0d253065e 100644 --- a/designate/mdns/notify.py +++ b/designate/mdns/notify.py @@ -141,13 +141,11 @@ class NotifyEndpoint(xfr.XFRMixin): rrset = response.answer[0] actual_serial = rrset.to_rdataset().items[0].serial - if actual_serial is None: - break - # TODO(vinod): Account for serial number wrap around. - elif actual_serial < domain.serial: + if actual_serial is None or actual_serial < domain.serial: + # TODO(vinod): Account for serial number wrap around. retries = retries - retry LOG.warn(_LW("Got lower serial for '%(zone)s' to '%(host)s:" - "%(port)s'. Expected:'%(es)d'. Got:'%(as)d'." + "%(port)s'. Expected:'%(es)d'. Got:'%(as)s'." "Retries left='%(retries)d'") % {'zone': domain.name, 'host': server.host, 'port': server.port, 'es': domain.serial, diff --git a/designate/pool_manager/rpcapi.py b/designate/pool_manager/rpcapi.py index 6c982cba7..7a2b93b6d 100644 --- a/designate/pool_manager/rpcapi.py +++ b/designate/pool_manager/rpcapi.py @@ -94,9 +94,11 @@ class PoolManagerAPI(object): def update_status(self, context, domain, server, status, actual_serial): LOG.info(_LI("update_status: Calling pool manager for %(domain)s : " - "%(action)s : %(status)s : %(serial)s") % + "%(action)s : %(status)s : %(serial)s on server " + "'%(host)s:%(port)s'") % {'domain': domain.name, 'action': domain.action, - 'status': domain.status, 'serial': actual_serial}) + 'status': status, 'serial': actual_serial, + 'host': server.host, 'port': server.port}) # Modifying the topic so it is pool manager instance specific. topic = '%s.%s' % (self.topic, domain.pool_id) diff --git a/designate/tests/test_mdns/test_notify.py b/designate/tests/test_mdns/test_notify.py index 2884d975e..30d2abc38 100644 --- a/designate/tests/test_mdns/test_notify.py +++ b/designate/tests/test_mdns/test_notify.py @@ -193,7 +193,7 @@ class MdnsNotifyTest(MdnsTestCase): 0, 0, 2, 0) self.assertEqual(status, 'ERROR') self.assertEqual(serial, None) - self.assertEqual(retries, 2) + self.assertEqual(retries, 0) @patch('dns.query.udp', side_effect=dns.exception.Timeout) @patch('dns.query.tcp', side_effect=dns.exception.Timeout)