Bug 1713712 - [Bug] Designate pool manager not honoring also_notifies in pools.yml - patch available
Summary: [Bug] Designate pool manager not honoring also_notifies in pools.yml - patch ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-designate
Version: 13.0 (Queens)
Hardware: Unspecified
OS: Linux
low
medium
Target Milestone: zstream
: 13.0 (Queens)
Assignee: Michael Johnson
QA Contact: Ofer Blaut
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-05-24 14:39 UTC by Cristian Muresanu
Modified: 2020-10-28 18:27 UTC (History)
7 users (show)

Fixed In Version: openstack-designate-6.0.1-5.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-28 18:26:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
designate_worker_bug_589409.patch (1.29 KB, patch)
2019-05-24 14:42 UTC, Cristian Muresanu
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 720766 0 None MERGED Worker should send NOTIFY also to all servers in 'also_notifies' pool settings. 2020-11-04 20:03:16 UTC
Red Hat Product Errata RHBA-2020:4387 0 None None None 2020-10-28 18:27:38 UTC

Description Cristian Muresanu 2019-05-24 14:39:33 UTC
Description of problem:

We are trying to make use of the also_notifies attribute used in the Designate pools.yml in our OSP 13 deployment to signal an external DNS service of changes within zones that Designate manages. 
It was identified that this feature wasn't working in a stock deployment and after some research found that it was a bug that got fixed in the upstream community https://bugs.launchpad.net/designate/+bug/1785769
A patch has been created against python-designate-6.0.1-3.el7ost.noarch and verify that the fix in the upstream bug solved the problem. 
We'd like this patch backported to OSP13.

The following patch is verified that works against python-designate-6.0.1-3.el7ost.noarch (based on the upstream bug fix)


designate_worker_bug_589409.patch
~~~
--- a/designate/worker/service.py	2019-05-21 19:48:31.919780738 +0000
+++ b/designate/worker/service.py	2019-05-21 19:51:25.894249273 +0000
@@ -34,6 +34,12 @@
 LOG = logging.getLogger(__name__)
 CONF = cfg.CONF

+class AlsoNotifyTask(object):
+    """
+    Placeholder to define options for also_notify targets
+    """
+    pass
+

 class Service(service.RPCService, service.Service):
     RPC_API_VERSION = '1.0'
@@ -121,10 +127,20 @@

     def _do_zone_action(self, context, zone):
         pool = self.get_pool(zone.pool_id)
-        task = zonetasks.ZoneAction(
+        all_tasks = []
+        all_tasks.append(zonetasks.ZoneAction(
             self.executor, context, pool, zone, zone.action
-        )
-        return self.executor.run(task)
+        ))
+
+        # Send a NOTIFY to each also-notifies
+        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,
+                                                  zone,
+                                                  notify_target))
+        return self.executor.run(all_tasks)

     def create_zone(self, context, zone):
         """
~~~

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Cristian Muresanu 2019-05-24 14:42:32 UTC
Created attachment 1572924 [details]
designate_worker_bug_589409.patch

Comment 16 errata-xmlrpc 2020-10-28 18:26:57 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat OpenStack Platform 13 bug fix and enhancement advisory), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:4387


Note You need to log in before you can comment on or make changes to this bug.