Fixed IP allocation doesn't clean up properly on failure

Bug #1328539 reported by Matthew Booth
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Unassigned

Bug Description

If fixed IP allocation fails, for example because nova's network interfaces got renamed after a reboot, nova will loop continuously trying, and failing, to create a new instance. For every attempted spawn the instance will end up with an additional fixed IP allocated to it. This is because the code is associating the IP, but not disassociating it if the function fails.

Tags: network
Revision history for this message
Aaron Rosen (arosen) wrote :

mind including the trace in the bug report?

Revision history for this message
Matthew Booth (mbooth-9) wrote :

The trace isn't interesting; it just shows an ip command failing due to an unknown network interface. This is really simple to recreate yourself: configure flat networking with invalid interfaces.

This bug is about the lack of cleanup after failure. Fix here: https://review.openstack.org/99065

Tracy Jones (tjones-i)
tags: added: network
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/99065
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=077e3c770ebeebd037ce882863a6b5dcefd644cf
Submitter: Jenkins
Branch: master

commit 077e3c770ebeebd037ce882863a6b5dcefd644cf
Author: Matthew Booth <email address hidden>
Date: Tue Jun 10 14:56:14 2014 +0100

    Fix resource cleanup in NetworkManager.allocate_fixed_ip

    NetworkManager.allocate_fixed_ip isn't cleaning up the resources it
    allocates in the event of a failure. This means that if, for example,
    _setup_network_on_host fails, the instance will still have a fixed IP
    allocated to it. Every attempt to spawn the instance will result in
    another fixed ip being allocated.

    Closes-Bug: #1328539

    Change-Id: Idfa1f4015acb10dc14fcec448257bcfe6971fc99

Changed in nova:
status: New → Fix Committed
Changed in nova:
milestone: none → juno-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: juno-2 → 2014.2
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.