Detach interface issue when local notification came earlier than driver

Bug #1392540 reported by Yi Ming Yin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
powervc-driver
Fix Committed
Undecided
Yi Ming Yin

Bug Description

In nova compute manager, it will first delete local port then call driver to detach interface. Such sequence will trigger an local port delete event, which may be handled earlier than driver took action.

In this case, driver cannot determine the remote PowerVC port id with the passed in local port id (which has been deleted already). Need to find another safer way to handle this situation.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to powervc-driver (stable/juno)

Fix proposed to branch: stable/juno
Review: https://review.openstack.org/134469

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to powervc-driver (stable/juno)

Reviewed: https://review.openstack.org/134469
Committed: https://git.openstack.org/cgit/stackforge/powervc-driver/commit/?id=8c766d08616b30dae4712f0a586adb28604725d6
Submitter: Jenkins
Branch: stable/juno

commit 8c766d08616b30dae4712f0a586adb28604725d6
Author: Yi Ming Yin <email address hidden>
Date: Fri Nov 14 16:57:01 2014 +0800

    Add extra logic to handle port detach issue

    nova manager will first delete local neutron port before call driver to
    detach port on PowerVC. This behavior will trigger a local port deleted
    event and cause current driver code failed to retrieve remote PowerVC
    port id when doing interface detach

    1. First priority is to use local port id to retrieve remote PowerVC
    port id, which is the current logic.
    2. If local port id cannot be retrieved, it will call interface_list on
    remote PowerVC instance and get all attached interface information. Then
    the code will scan all the local port IP addresses and compare to remote
    IP addresses and find the matched port id to detach.

    Change-Id: I3a87f3780c2cb949a0dc80380a37ab17bb98e059
    Closes-Bug: #1392540

tags: added: in-stable-juno
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to powervc-driver (master)

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

Changed in powervc-driver:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to powervc-driver (master)

Reviewed: https://review.openstack.org/134744
Committed: https://git.openstack.org/cgit/stackforge/powervc-driver/commit/?id=7fc7fc17e9a41d8450ea750c71d105418453b5f2
Submitter: Jenkins
Branch: master

commit 7fc7fc17e9a41d8450ea750c71d105418453b5f2
Author: Yi Ming Yin <email address hidden>
Date: Fri Nov 14 16:57:01 2014 +0800

    Add extra logic to handle port detach issue

    nova manager will first delete local neutron port before call driver to
    detach port on PowerVC. This behavior will trigger a local port deleted
    event and cause current driver code failed to retrieve remote PowerVC
    port id when doing interface detach

    1. First priority is to use local port id to retrieve remote PowerVC
    port id, which is the current logic.
    2. If local port id cannot be retrieved, it will call interface_list on
    remote PowerVC instance and get all attached interface information. Then
    the code will scan all the local port IP addresses and compare to remote
    IP addresses and find the matched port id to detach.

    Change-Id: I3a87f3780c2cb949a0dc80380a37ab17bb98e059
    Closes-Bug: #1392540
    (cherry picked from commit 8c766d08616b30dae4712f0a586adb28604725d6)

Changed in powervc-driver:
status: In Progress → Fix Committed
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.