Merge "Do AXFR with latest data"

This commit is contained in:
Zuul
2025-08-06 12:11:11 +00:00
committed by Gerrit Code Review
3 changed files with 19 additions and 10 deletions

View File

@@ -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):

View File

@@ -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):

View File

@@ -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.