Failure in interface-attach may leave port around

Bug #1338551 reported by Drew Thorstensen
30
This bug affects 5 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Eli Qiao

Bug Description

When the interface-attach action is run, it may be passed in a network (but no port identifier). Therefore, the action allocates a port on that network. However, if the attach method fails for some reason, the port is not cleaned up.

This behavior would be appropriate if the invoker had passed in a port identifier. However if nova created the port for the action and that action failed, the port should be cleaned up as part of the failure.

The allocation of the port occurs in nova/compute/manager.py in the attach_interface method. Recommend that we de-allocate the port for the instance had no port_id been passed in.

Changed in nova:
assignee: nobody → Drew Thorstensen (thorst)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
status: New → In Progress
Matt Riedemann (mriedem)
tags: added: network neutron
Revision history for this message
Matt Riedemann (mriedem) wrote :

Do you have a stack trace for the failure so we can see where and how it failed?

Changed in nova:
assignee: Drew Thorstensen (thorst) → Paul Ward (wpward)
Revision history for this message
Chris Behrens (cbehrens) wrote :

This appears to be a duplicate of 1341498... marking so.

Revision history for this message
Chris Behrens (cbehrens) wrote :

(I marked the other one as a duplicate of this one)

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

Change abandoned by Drew Thorstensen (<email address hidden>) on branch: master
Review: https://review.openstack.org/105238
Reason: Abadoning in favor of the following change set: https://review.openstack.org/#/c/109178/

Changed in nova:
assignee: Paul Ward (wpward) → Eli Qiao (taget-9)
Changed in nova:
status: In Progress → Confirmed
Changed in nova:
status: Confirmed → In Progress
tags: added: juno-backport-potential
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :

Fix proposed in https://review.openstack.org/#/c/109178/ is still in progress

Changed in nova:
assignee: Eli Qiao (taget-9) → Davanum Srinivas (DIMS) (dims-v)
Changed in nova:
assignee: Davanum Srinivas (DIMS) (dims-v) → Eli Qiao (taget-9)
Changed in nova:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/109178
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=78f7c744f675d618048968850259422338dd4955
Submitter: Jenkins
Branch: master

commit 78f7c744f675d618048968850259422338dd4955
Author: Eli Qiao <email address hidden>
Date: Tue Aug 19 11:16:56 2014 +0800

    Handle exception when attaching interface failed

    Currently, when attaching interface to an instance, nova doesn't
    handle the exception when calling `driver.attach_interface`, so
    the network info will leak when exception happened.

    This patch deallocates port when attaching interface failed,
    and give warn messages when deallocate port failed.

    Change-Id: I4fe67b5ce1b5ed41412d824a8c10b9a5e4fb325f
    Closes-bug: #1338551
    Co-authored-by: Alex Xu <email address hidden>

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → kilo-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: kilo-3 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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