When in a subordinate relation with neutron-gateway, breaks the latter

Bug #1520703 reported by Florian Haas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron-openvswitch (Juju Charms Collection)
Fix Released
Medium
James Page

Bug Description

This is not so much actually a bug, but rather a design issue that makes it very easy for people to break something, with an innocent mistake, in a way that is rather difficult to recover from.

This charm is meant to be subordinate only to nova-compute, not to neutron-gateway. However, due to the way subordinate charms are wired, it is *possible* to build such a relationship with a simple

juju add-relation neutron-openvswitch neutron-gateway

When neutron-openvswitch thus becomes subordinate to neutron-gateway, the neutron-gateway node oscillates between having neutron-dhcp-agent, neutron-vpn-agent and neutron-metadata-agent installed (neutron-gateway) and uninstalled (neutron-openvswitch), depending on which charm Juju is currently handling.

Needless to say, this puts the user in a world of pain. Pretty much all their networking will break, and there is no way to remove a subordinate charm relationship other than killing and redeploying the principal charm altogether. Since neutron-gateway is deployed to the bare metal, rather than a container, this means a physical re-installation, which even with MAAS can be painfully time-consuming. And until such a redeployment has completed, their cloud is largely non-functional.

I don't have a particularly good suggestion on how this could be addressed, other than perhaps teaching the principal charm a blacklist of charms it does *not* want as subordinates. Any other ideas?

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

I think this might actually be quite trivial to resolve; the nova-compute integration uses a explicitly declared container scoped relation; the reason its possible to relate neutron-openvswitch to neutron-gateway is due to the additional:

  requires:
    container:
      interface: juju-info
      scope: container

relation declared which is superfluous - we should be able to drop this at which point:

$ juju add-relation neutron-openvswitch neutron-gateway
ERROR no relations found

Changed in neutron-openvswitch (Juju Charms Collection):
importance: Undecided → Medium
status: New → Triaged
milestone: none → 16.01
James Page (james-page)
Changed in neutron-openvswitch (Juju Charms Collection):
status: Triaged → In Progress
assignee: nobody → James Page (james-page)
Revision history for this message
Florian Haas (fghaas) wrote : Re: [Bug 1520703] Re: When in a subordinate relation with neutron-gateway, breaks the latter

Thanks. Of course, it would actually be quite intuitively logical for
this charm to be subordinate to neutron-gateway, and it would probably
save a lot of code duplication if it were done that way. But as it is,
creating the subordinate relation *seems* to work but actually royally
messes things up, so yes, dropping the relation altogether is probably
the superior option.

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

Some of that's historical; neutron-gateway preceeded neutron-openvswitch by quite some time, and although the nova-compute integration has been refactored to work this way, the neutron-gateway charm is still on the TODO list; we're generally taking the approach of splitting out l2 management for any SDN provider into a subordinate charm in this way.

James Page (james-page)
Changed in neutron-openvswitch (Juju Charms Collection):
status: In Progress → Fix Committed
tags: added: openstack
James Page (james-page)
Changed in neutron-openvswitch (Juju Charms Collection):
status: Fix Committed → Fix Released
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.