Do AXFR with latest data
Primary Designate updates zone and notifies Secondary Designate simultaneously. That's why Secondary Designate doesn't do AXFR or gets the previous version. Now Primary Designate updates zone and backend. If backend is updated successfuly, then Designate notifies Secondary Designate. Closes-Bug: #2098388 Change-Id: Ib0c8523e47c61638b3f579091a1955c96aa81a6b
This commit is contained in:

committed by
mitya-eremeev-2

parent
3484e178aa
commit
ac7cdcd950
@@ -251,7 +251,7 @@ class WorkerServiceTest(oslotest.base.BaseTestCase):
|
||||
self.zone_params
|
||||
)
|
||||
|
||||
self.service._executor.run.assert_called_with([mock_zone_action()])
|
||||
self.service._executor.run.assert_has_calls(mock_zone_action(), list())
|
||||
|
||||
@mock.patch.object(service.zonetasks, 'ZoneAction')
|
||||
@mock.patch.object(service.zonetasks, 'SendNotify')
|
||||
@@ -280,8 +280,8 @@ class WorkerServiceTest(oslotest.base.BaseTestCase):
|
||||
self.zone_params
|
||||
)
|
||||
|
||||
self.service._executor.run.assert_called_with(
|
||||
[mock_zone_action(), mock_send_notify()]
|
||||
self.service._executor.run.assert_has_calls(
|
||||
mock_zone_action(), [mock_send_notify()]
|
||||
)
|
||||
|
||||
def test_get_pool(self):
|
||||
|
@@ -142,20 +142,20 @@ class Service(service.RPCService):
|
||||
|
||||
def _do_zone_action(self, context, zone, zone_params=None):
|
||||
pool = self.get_pool(zone.pool_id)
|
||||
all_tasks = [
|
||||
zonetasks.ZoneAction(self.executor, context, pool, zone,
|
||||
zone.action, zone_params)
|
||||
]
|
||||
|
||||
zone_action = zonetasks.ZoneAction(
|
||||
self.executor, context, pool, zone, zone.action, zone_params)
|
||||
all_tasks_result = self.executor.run(zone_action)
|
||||
# Send a NOTIFY to each also-notifies
|
||||
also_notifies_tasks = list()
|
||||
for also_notify in pool.also_notifies:
|
||||
notify_target = AlsoNotifyTask()
|
||||
notify_target.options = {'host': also_notify.host,
|
||||
'port': also_notify.port}
|
||||
all_tasks.append(zonetasks.SendNotify(self.executor,
|
||||
also_notifies_tasks.append(zonetasks.SendNotify(self.executor,
|
||||
zone,
|
||||
notify_target))
|
||||
return self.executor.run(all_tasks)
|
||||
all_tasks_result.extend(self.executor.run(also_notifies_tasks))
|
||||
return all_tasks_result
|
||||
|
||||
@rpc.expected_exceptions()
|
||||
def create_zone(self, context, zone):
|
||||
|
@@ -0,0 +1,9 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
If primary zone is updated, Designate does two actions simultaneously:
|
||||
1) sends NOTIFY to secondary DNS server
|
||||
2) updates its backend
|
||||
Notification is significantly faster then backend update. So secondary DNS
|
||||
server gets previous zone version (SOA).
|
||||
Now it's fixed. Designate sends NOTIFY after successful backend update.
|
Reference in New Issue
Block a user