Designate charm is missing support for integration with Neutron

Bug #1704769 reported by Tytus Kurek
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Designate Charm
Fix Released
Wishlist
Tytus Kurek
OpenStack Neutron API Charm
Fix Released
Wishlist
Tytus Kurek

Bug Description

Designate charm is currently missing support for integration with Neutron as described at https://docs.openstack.org/mitaka/networking-guide/config-dns-int.html . This could be implemented by introducing a relation between Designate and Neutron charms.

Changed in charm-designate:
status: New → Triaged
importance: Undecided → Wishlist
Revision history for this message
Tytus Kurek (tkurek) wrote :

Fix proposed:

- "designate" charm side:

https://review.openstack.org/498806

- "neutron-api" charm side:

https://review.openstack.org/498808

- "endpoint" interface:

https://github.com/tytus-kurek/charm-interface-endpoint

BTW, "designate" charm build fails with the following error:

tkurek@Tkurek-Laptop:~/git/charm-designate$ tox -e build
...
build: Unable to locate interface:endpoint. Do you need to set INTERFACE_PATH?
ERROR: InvocationError: '/home/tkurek/git/charm-designate/.tox/build/bin/charm-build --log-level DEBUG -o /home/tkurek/git/charm-designate/build src'
_________________________________________________________________________________________________ summary __________________________________________________________________________________________________
ERROR: build: commands failed

however, all environmental variables are set:

tkurek@Tkurek-Laptop:~/git/charm-designate$ echo $JUJU_REPOSITORY
/home/tkurek/charms
tkurek@Tkurek-Laptop:~/git/charm-designate$ echo $LAYER_PATH
/home/tkurek/charms/layers
tkurek@Tkurek-Laptop:~/git/charm-designate$ echo $INTERFACE_PATH
/home/tkurek/charms/interfaces
tkurek@Tkurek-Laptop:~/git/charm-designate$ ls -l /home/tkurek/charms/
total 8
drwxrwxr-x 3 tkurek tkurek 4096 sie 29 14:48 interfaces
drwxrwxr-x 2 tkurek tkurek 4096 sie 29 14:47 layers
tkurek@Tkurek-Laptop:~/git/charm-designate$ ls -l /home/tkurek/charms/interfaces/
total 4
drwxrwxr-x 3 tkurek tkurek 4096 sie 29 14:48 endpoint
tkurek@Tkurek-Laptop:~/git/charm-designate$ ls -l /home/tkurek/charms/interfaces/endpoint/
total 32
-rw-rw-r-- 1 tkurek tkurek 826 sie 29 14:48 copyright
-rw-rw-r-- 1 tkurek tkurek 163 sie 29 14:48 interface.yaml
-rw-rw-r-- 1 tkurek tkurek 11357 sie 29 14:48 LICENSE
-rw-rw-r-- 1 tkurek tkurek 1241 sie 29 14:48 provides.py
-rw-rw-r-- 1 tkurek tkurek 860 sie 29 14:48 README.md
-rw-rw-r-- 1 tkurek tkurek 38 sie 29 14:48 test-requirements.txt

Revision history for this message
James Page (james-page) wrote :

This is a bit to late for the upcoming charm release; expect reviews after the release next week.

Revision history for this message
Alex Kavanagh (ajkavanagh) wrote :

The reason the charm fails to build on OSCI is because the charm-interface-endpoint isn't registered at http://interfaces.juju.solutions/

However, 'endpoint' isn't a very good name for the interface; it really needs to be more descriptive of what the relationship is between neutron-api and designate, please.

Revision history for this message
Alex Kavanagh (ajkavanagh) wrote :

Additionally, the new interface should be registered as an OpenStack project as, strictly speaking, it is between two OpenStack charms and should be reviewed/changed under the OpenStack review process.

Revision history for this message
Alex Kavanagh (ajkavanagh) wrote :

The interface code (currently at https://github.com/tytus-kurek/charm-interface-endpoint/blob/master/provides.py) probably ought to use the data_changed() helper to stop it attempting to set the same data over and over again (an unfortunate consequence of charms.reactive and how handlers are always run when true, regardless of the hook).

e.g.

    from charms.reactive.helpers import data_changed

    def expose_endpoint(self, endpoint):
        relation_info = {
            'endpoint': endpoint,
        }
        if data_changed('expose_endpoint', relation_info):
            self.set_local(**relation_info)
            self.set_remote(**relation_info)

It's also not clear why the local data is being set?

Tytus Kurek (tkurek)
tags: added: 4010
Revision history for this message
Tytus Kurek (tkurek) wrote :
Tytus Kurek (tkurek)
Changed in charm-designate:
assignee: nobody → Tytus Kurek (tkurek)
Tytus Kurek (tkurek)
tags: added: cpe-onsite
Tytus Kurek (tkurek)
Changed in charm-neutron-api:
assignee: nobody → Tytus Kurek (tkurek)
Changed in charm-neutron-api:
status: New → Triaged
importance: Undecided → Wishlist
Tytus Kurek (tkurek)
Changed in charm-designate:
status: Triaged → In Progress
Changed in charm-neutron-api:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-designate (master)

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

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

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

Revision history for this message
Tytus Kurek (tkurek) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-neutron-api (master)

Reviewed: https://review.openstack.org/514629
Committed: https://git.openstack.org/cgit/openstack/charm-neutron-api/commit/?id=95c045d1ce65d0da93e8ec5155ca1f8b7b998ae2
Submitter: Zuul
Branch: master

commit 95c045d1ce65d0da93e8ec5155ca1f8b7b998ae2
Author: Tytus Kurek <email address hidden>
Date: Mon Nov 20 10:52:41 2017 +0100

    Designate - Neutron integration

    This patchset implements new relation ("external-dns") using new
    interface ("designate") between designate and neutron-api charms.
    The following charm options have been added:

    * "reverse-dns-lookup"
    * "ipv4-ptr-zone-prefix-size"
    * "ipv6-ptr-zone-prefix-size"

    The patchset contains changes to various items (config files, hooks,
    template files and unit tests).

    When neutron-api is related to designate, the notification topic
    previously used to send notification events to designate will be
    disabled (as the DNS driver method is preferred).

    Change-Id: I13b2ab39bd1daac13112398762f2be06022594b0
    Closes-Bug: #1704769

Changed in charm-neutron-api:
status: In Progress → Fix Committed
Revision history for this message
David Ames (thedac) wrote :

Neutron-api landed.

I spent a lot of time working on amulet tests for designate but the exact circumstances for the neutron-designate integration basically takes full cloud. I am convinced this is not the right approach.

As such the designate changes are ready for review and landing:
https://review.openstack.org/#/c/514627/

Here is a mojo spec which creates and tests the exact circumstances required:
https://code.launchpad.net/~thedac/openstack-mojo-specs/designate-neutron/+merge/335491

I plan to do a blog posts explaining this in detail after break.

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

Reviewed: https://review.openstack.org/514627
Committed: https://git.openstack.org/cgit/openstack/charm-designate/commit/?id=61ae382152930c8d2762ab9c2efc409de4db61c5
Submitter: Zuul
Branch: master

commit 61ae382152930c8d2762ab9c2efc409de4db61c5
Author: Tytus Kurek <email address hidden>
Date: Mon Nov 20 10:53:10 2017 +0100

    Designate - Neutron integration

    This patchset implements Designate - Neutron integration feature
    based on Neutron extension drivers. As a result DNS records can be
    automatically created in Designate when Neutron ports or floating
    IPs are created.

    Closes-Bug: #1704769
    Depends-On: I13b2ab39bd1daac13112398762f2be06022594b0
    Change-Id: I001507eff6a3342cc77188e0f4087fa4fcc67b95

Changed in charm-designate:
status: In Progress → Fix Committed
James Page (james-page)
Changed in charm-designate:
milestone: none → 18.02
Changed in charm-neutron-api:
milestone: none → 18.02
Ryan Beisner (1chb1n)
Changed in charm-designate:
status: Fix Committed → Fix Released
Changed in charm-neutron-api:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on charm-neutron-api (master)

Change abandoned by Frode Nordahl (<email address hidden>) on branch: master
Review: https://review.openstack.org/498808
Reason: Marking this review as abandoned due to lack of activity in the past 6 months.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on charm-designate (master)

Change abandoned by Frode Nordahl (<email address hidden>) on branch: master
Review: https://review.openstack.org/498806
Reason: Marking this review as abandoned due to lack of activity in the past 6 months.

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.