Retry serial number check in one more case
Mdns retries when it does not get an actual serial number back. Partial-Bug: 1433585 Change-Id: I2fbf16cfbc9d95bba65ebf0608e5060364fb7ffc
This commit is contained in:
parent
eaa914489d
commit
7c6db7bffe
@ -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
|
||||
if actual_serial is None or actual_serial < domain.serial:
|
||||
# TODO(vinod): Account for serial number wrap around.
|
||||
elif actual_serial < domain.serial:
|
||||
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,
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user