Designate Worker does not send 'also_notifies'

Bug #1785769 reported by Dmitry Galkin
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Designate
Fix Released
Undecided
Dmitry Galkin

Bug Description

Hello,

Pool manager previously had a possibility to send NOTIFY messages to a list of DNS servers specified in the pools.yaml under 'also_notifies' list: https://docs.openstack.org/designate/pike/admin/pools.html

According to docs, that is still possible, but when using designate-worker this does not work.

Expected:
Worker sends NOTIFY message also to all hosts as specified in pools.yaml for respective pool.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to designate (master)

Fix proposed to branch: master
Review: https://review.openstack.org/589409

Changed in designate:
assignee: nobody → Dmitry Galkin (galkindmitrii)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to designate (master)

Reviewed: https://review.openstack.org/589409
Committed: https://git.openstack.org/cgit/openstack/designate/commit/?id=6e79c2e0816ca59cff9a8b0eb238e1e5add7b943
Submitter: Zuul
Branch: master

commit 6e79c2e0816ca59cff9a8b0eb238e1e5add7b943
Author: Dmitry Galkin <email address hidden>
Date: Tue Aug 7 09:22:31 2018 +0000

    Worker should send NOTIFY also to all servers in 'also_notifies' pool settings.

    Change-Id: I0a85c5df5c323d6f636c8cb92ee5201c14cdb306
    Closes-Bug: #1785769

Changed in designate:
status: In Progress → Fix Released
Revision history for this message
Andreas Krebs (wintamute) wrote :

I found this commited fix while searching for this 'also_notifies' issue. Looking at the changes I'm not sure how this actually fixes the issue since the fix lacks an actual implementation unless I'm missing something.

In https://git.openstack.org/cgit/openstack/designate/tree/designate/worker/service.py?id=6e79c2e0816ca59cff9a8b0eb238e1e5add7b943

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

Revision history for this message
Dmitry Galkin (galkindmitrii) wrote :

You're missing this method which creates notify tasks and appends them the task list for each entry in a particular pool.

    def _do_zone_action(self, context, zone):
        pool = self.get_pool(zone.pool_id)
        all_tasks = []
        all_tasks.append(zonetasks.ZoneAction(
            self.executor, context, pool, zone, zone.action
        ))

        # 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)

Revision history for this message
Andreas Krebs (wintamute) wrote :

Yes, sorry for the noise, I was mainly missing a functioning brain after some hours of trouble shooting.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/designate 8.0.0.0rc1

This issue was fixed in the openstack/designate 8.0.0.0rc1 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to designate (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.opendev.org/720765

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to designate (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.opendev.org/720766

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to designate (stable/rocky)

Reviewed: https://review.opendev.org/720765
Committed: https://git.openstack.org/cgit/openstack/designate/commit/?id=e4ee680f24d00b9633284c061edebaf0f62d7b3c
Submitter: Zuul
Branch: stable/rocky

commit e4ee680f24d00b9633284c061edebaf0f62d7b3c
Author: Dmitry Galkin <email address hidden>
Date: Tue Aug 7 09:22:31 2018 +0000

    Worker should send NOTIFY also to all servers in 'also_notifies' pool settings.

    Change-Id: I0a85c5df5c323d6f636c8cb92ee5201c14cdb306
    Closes-Bug: #1785769
    (cherry picked from commit 6e79c2e0816ca59cff9a8b0eb238e1e5add7b943)

tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to designate (stable/queens)

Reviewed: https://review.opendev.org/720766
Committed: https://git.openstack.org/cgit/openstack/designate/commit/?id=076600dd9107baf567c3dc032a0901dfeda73784
Submitter: Zuul
Branch: stable/queens

commit 076600dd9107baf567c3dc032a0901dfeda73784
Author: Dmitry Galkin <email address hidden>
Date: Tue Aug 7 09:22:31 2018 +0000

    Worker should send NOTIFY also to all servers in 'also_notifies' pool settings.

    Change-Id: I0a85c5df5c323d6f636c8cb92ee5201c14cdb306
    Closes-Bug: #1785769
    (cherry picked from commit 6e79c2e0816ca59cff9a8b0eb238e1e5add7b943)

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/designate queens-eol

This issue was fixed in the openstack/designate queens-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/designate rocky-eol

This issue was fixed in the openstack/designate rocky-eol release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.