nova-manage network delete fails with QuantumManager

Bug #902175 reported by Isaku Yamahata
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Brad Hall
neutron
Fix Released
High
Brad Hall
quantum (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Precise by Yolanda Robla

Bug Description

With QuantumManager network driver and linux_net LinuxOVSInterfaceDriver interface driver
- create network
- create an instance and terminate
- then nova-manage network delete fails.
And the db state remains inconsistent state. It requires manual fix by issuing SQL.

The reason is
- LinuxOVSInterfaceDriver implements unplug as nop.
- It creates gw-xxx and register the port to Quantum at the time first instance is created
- When deleting network, the gw-xxx reamins. So network deletion request to quantum fails
  due to the interface gw-xxx is attached and busy.

The fix would be
- implement unplug and call unattach and delete the port request to quantum
- stop dnsmasq daemon

Revision history for this message
Salvatore Orlando (salvatore-orlando) wrote :

Hi Isaku!

Thanks for reporting this bugs, and for proposing a strategy for fixing it.

I'm not really up-to-date on the Quantum-nova integration, but I was wondering why we would need to stop dnsmasq. This might make sense with the VLAN manager, altough I think there is already code in place for destroying resources on the network node, including the dnsmasq instance, when a network is delete.

However, in FlatDHCP mode, if I'm not wrong the same dnsmasq instance is used for all networks (several IP addresses are configured on the bridge).

Revision history for this message
dan wendlandt (danwent) wrote :

Hi Isaku,

Thanks for the bug report! Its great to also report such issues in the Quantum project (or send email to the netstack list) as sometimes quantum developers won't see a bug that is just filed under nova. Thankfully Salvatore noticed this one.

This bug is specific to using DHCP / L3 NAT gateways.

The fact that LinuxOVSInterfaceDriver doesn't do anything on unplug is not actually the problem (though its something we should clean up anyway, as there will be stale linux devices lying around...).

I believe the real issue is that QuantumManager needs to clean up the "gateway" port on a Quantum network before attempting to delete it, otherwise Quantum refuses to to delete the network with a NetworkInUse error. This should be a QuantumManager fix.

Changed in quantum:
assignee: nobody → Brad Hall (bgh)
milestone: none → essex-2
Brad Hall (bgh)
Changed in nova:
assignee: nobody → Brad Hall (bgh)
dan wendlandt (danwent)
Changed in quantum:
importance: Undecided → High
status: New → In Progress
Brad Hall (bgh)
Changed in nova:
status: New → In Progress
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/2259
Committed: http://github.com/openstack/nova/commit/724e5e7a5bc065be239b3ededf0609de386c1d6f
Submitter: Jenkins
Branch: master

 status fixcommitted
 done

commit 724e5e7a5bc065be239b3ededf0609de386c1d6f
Author: Brad Hall <email address hidden>
Date: Mon Dec 12 18:24:26 2011 +0000

    Fix for bug 902175

    Remove the gateway port when deleting the network (if it's the only one left),
    and kill dnsmasq if the network is deleted.

    Change-Id: If6b4798ddb4d21fe6c32ac20e6237494b799ecbd

dan wendlandt (danwent)
Changed in quantum:
status: In Progress → Fix Committed
Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to quantum (master)

Reviewed: https://review.openstack.org/2258
Committed: http://github.com/openstack/quantum/commit/b0652c0dff90d68a6a7cf84b536e7e539e344f74
Submitter: Jenkins
Branch: master

 status fixcommitted
 done

commit b0652c0dff90d68a6a7cf84b536e7e539e344f74
Author: Brad Hall <email address hidden>
Date: Mon Dec 12 18:26:21 2011 +0000

    Fix for bug 902175

    We can't use merge if we're removing a field from the port object so use add
    instead. Also, pass the session to port_get so that we don't run into the
    "this port is already bound to session x" error.

    Change-Id: I54a8484c8f6429ad18fb0c5e088720d21fc16299

Thierry Carrez (ttx)
Changed in nova:
milestone: none → essex-2
status: Fix Committed → Fix Released
dan wendlandt (danwent)
Changed in quantum:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: essex-2 → 2012.1
Thierry Carrez (ttx)
Changed in quantum:
milestone: essex-2 → 2012.1
Changed in quantum (Ubuntu):
status: New → 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.