← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1540271] Re: ha interface cleanup can leave orphans

 

Reviewed:  https://review.openstack.org/274571
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=0074b943d6efc5526c687cc9ca3857aabc2dbc63
Submitter: Jenkins
Branch:    master

commit 0074b943d6efc5526c687cc9ca3857aabc2dbc63
Author: Kevin Benton <kevin@xxxxxxxxxx>
Date:   Sat Apr 9 12:15:56 2016 -0700

    Add RouterPort binding to ha interface creation
    
    The L3 HA interface cleanup routines during router deletion were
    occuring after the parent router resource was deleted. This meant
    that if they failed to delete, they would be orphaned since the
    parent router was already gone.
    
    This order of router delete and then HA delete was intentional
    because deleting them before calling the parent router delete
    function would cause them to be deleted before the checks to see
    if the router was in use. If the router was in use, the HA interface
    would be removed and would leave an HA router in an inconsitent state.
    (See I956d0094ae6e2412e859d79feeb4003941d2bb4b for details)
    
    This patch just has the L3 HA code add a RouterPort binding for the
    HA interfaces. This allows the parent router_delete call to delete the
    HA interfaces automatically after doing the in-use check but before
    deleting the actual router.
    
    In order to avoid a migration in a back-port, this is compatible with
    previously created routers as well by continuing to call
    _delete_ha_interfaces after the parent router is deleted. This means
    that any routers created before this patch will potentially leave
    orphans that will have to be manually deleted via the port API.
    
    Closes-Bug: #1540271
    Change-Id: Ifd3e007aaf2a2ed8123275aa3a9f540838e3c003


** Changed in: neutron
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1540271

Title:
  ha interface cleanup can leave orphans

Status in neutron:
  Fix Released

Bug description:
  The HA delete_router routine may leave behind stranded interfaces if
  it fails to delete the HA ports because it deletes the router object
  before removing the ports. This failure could be an issue in the
  loaded ML2 drivers, or it could simply be that the neutron server
  process was killed before completing the deletion.

  These orphaned interfaces are then difficult to delete via the API due
  to their device_owner field.

  https://github.com/openstack/neutron/blob/6bcacc114281b1017acae7e436a56b2da09f69f1/neutron/db/l3_hamode_db.py#L504-L512

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1540271/+subscriptions


References