Merge "Do AXFR with latest data"
This commit is contained in:
@@ -251,7 +251,7 @@ class WorkerServiceTest(oslotest.base.BaseTestCase):
|
|||||||
self.zone_params
|
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, 'ZoneAction')
|
||||||
@mock.patch.object(service.zonetasks, 'SendNotify')
|
@mock.patch.object(service.zonetasks, 'SendNotify')
|
||||||
@@ -280,8 +280,8 @@ class WorkerServiceTest(oslotest.base.BaseTestCase):
|
|||||||
self.zone_params
|
self.zone_params
|
||||||
)
|
)
|
||||||
|
|
||||||
self.service._executor.run.assert_called_with(
|
self.service._executor.run.assert_has_calls(
|
||||||
[mock_zone_action(), mock_send_notify()]
|
mock_zone_action(), [mock_send_notify()]
|
||||||
)
|
)
|
||||||
|
|
||||||
def test_get_pool(self):
|
def test_get_pool(self):
|
||||||
|
@@ -142,20 +142,20 @@ class Service(service.RPCService):
|
|||||||
|
|
||||||
def _do_zone_action(self, context, zone, zone_params=None):
|
def _do_zone_action(self, context, zone, zone_params=None):
|
||||||
pool = self.get_pool(zone.pool_id)
|
pool = self.get_pool(zone.pool_id)
|
||||||
all_tasks = [
|
zone_action = zonetasks.ZoneAction(
|
||||||
zonetasks.ZoneAction(self.executor, context, pool, zone,
|
self.executor, context, pool, zone, zone.action, zone_params)
|
||||||
zone.action, zone_params)
|
all_tasks_result = self.executor.run(zone_action)
|
||||||
]
|
|
||||||
|
|
||||||
# Send a NOTIFY to each also-notifies
|
# Send a NOTIFY to each also-notifies
|
||||||
|
also_notifies_tasks = list()
|
||||||
for also_notify in pool.also_notifies:
|
for also_notify in pool.also_notifies:
|
||||||
notify_target = AlsoNotifyTask()
|
notify_target = AlsoNotifyTask()
|
||||||
notify_target.options = {'host': also_notify.host,
|
notify_target.options = {'host': also_notify.host,
|
||||||
'port': also_notify.port}
|
'port': also_notify.port}
|
||||||
all_tasks.append(zonetasks.SendNotify(self.executor,
|
also_notifies_tasks.append(zonetasks.SendNotify(self.executor,
|
||||||
zone,
|
zone,
|
||||||
notify_target))
|
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()
|
@rpc.expected_exceptions()
|
||||||
def create_zone(self, context, zone):
|
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