libvirt driver doesn't cleanup the tap interface on vm re-schedule

Bug #1531022 reported by pritesh
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
nova-powervm
Fix Released
Low
Sridhar Venkat

Bug Description

Here when you use libvirt driver with tap interfaces, it creates a tap interface on the host but doesn't clean up the interface and leaves in-tact and creates another same named interface on the new host.

In _do_build_and_run_instance when RescheduledException is called, manager checks if the network port needs to be de-allocated for a different host or not using deallocate_networks_on_reschedule() which is hard coded to return False. If this is changed to return true or set via conf file configuration to allow being changed for specific mech drivers in neutron then it would be helpful to not only clean up the tap interface properly but also also mech drivers in neutron to re-create new ports on new host instead of shifting and re-using same ports which fails.

tested on master and stable/liberty and fails in both cases, so may need back porting.

Revision history for this message
Wenzhi Yu (yuywz) wrote :
tags: added: libvirt
Revision history for this message
pritesh (pritesh) wrote :

@Wen: this is not a duplicate bug, I tested the patch (https://review.openstack.org/243477) which https://bugs.launchpad.net/nova/+bug/1510979 fixes, but it does not cover a fix for tap interfaces, it just fixes it for neutron. I have attached log files to show the latest test. the tap interface are created with same name on multiple hosts like shown here:

Host-1:
ubuntu@ip-192-168-0-10:~$ ifconfig tapcaba1b94-47
tapcaba1b94-47 Link encap:Ethernet HWaddr c6:be:57:50:ba:93
          inet6 addr: fe80::c4be:57ff:fe50:ba93/64 Scope:Link
          UP BROADCAST MULTICAST MTU:1500 Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:2 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

Host-2:
ubuntu@ip-192-168-0-11:~$ ifconfig tapcaba1b94-47
tapcaba1b94-47 Link encap:Ethernet HWaddr a6:07:7c:bc:ce:e7
          inet6 addr: fe80::a407:7cff:febc:cee7/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:9 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:1467 (1.4 KB) TX bytes:648 (648.0 B)

Changed in nova:
assignee: nobody → Sana Khan (sana.khan)
Sean Dague (sdague)
Changed in nova:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Andrew Laski (alaski) wrote :

There's been no progress in 4 months. Sana if you are still working on this please assign it back to yourself.

Changed in nova:
assignee: Sana Khan (sana.khan) → nobody
Changed in nova:
assignee: nobody → Sana Khan (sana.khan)
Revision history for this message
Sujitha (sujitha-neti) wrote :

Sana Khan, If you are currently working on a patch, can you please change the status of this bug to In Progress.

Changed in nova:
status: Confirmed → In Progress
Revision history for this message
Augustina Ragwitz (auggy) wrote :

Also be sure to use the tag "Closes-Bug:#1531022" in your commit message so the bug is automatically updated.

tags: added: liberty-backport-potential
Revision history for this message
Eric Fried (efried) wrote :

Addressed in nova-powervm by https://review.openstack.org/#/c/460672/

Changed in nova-powervm:
assignee: nobody → Sridhar Venkat (svenkat)
importance: Undecided → Low
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova-powervm (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/461653

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova-powervm (master)

Reviewed: https://review.openstack.org/460672
Committed: https://git.openstack.org/cgit/openstack/nova-powervm/commit/?id=dedc355805c24583fbad5f4e5c416881239e377e
Submitter: Jenkins
Branch: master

commit dedc355805c24583fbad5f4e5c416881239e377e
Author: <email address hidden> <email address hidden>
Date: Thu Apr 27 12:43:07 2017 -0400

    Deallocate network on reschedule

    When a virtual machine fails to deploy on one host
    then deallocate networks so that when the same
    virtual machine deployed on another host network
    is allocated again.

    Change-Id: I9624e44def8afa01c45527d625917adb6847c55f
    Closes-bug: #1531022

Changed in nova-powervm:
status: In Progress → Fix Released
tags: added: in-stable-ocata
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova-powervm (stable/ocata)

Reviewed: https://review.openstack.org/461653
Committed: https://git.openstack.org/cgit/openstack/nova-powervm/commit/?id=40df0771efff1f8c4890d2c1c63e23801629b465
Submitter: Jenkins
Branch: stable/ocata

commit 40df0771efff1f8c4890d2c1c63e23801629b465
Author: <email address hidden> <email address hidden>
Date: Thu Apr 27 12:43:07 2017 -0400

    Deallocate network on reschedule

    When a virtual machine fails to deploy on one host
    then deallocate networks so that when the same
    virtual machine deployed on another host network
    is allocated again.

    Change-Id: I9624e44def8afa01c45527d625917adb6847c55f
    Closes-bug: #1531022

Revision history for this message
Sean Dague (sdague) wrote :

There are no currently open reviews on this bug, changing
the status back to the previous state and unassigning. If
there are active reviews related to this bug, please include
links in comments.

Changed in nova:
status: In Progress → Confirmed
assignee: Sana Khan (sana.khan) → nobody
Revision history for this message
Sean Dague (sdague) wrote :

Automatically discovered version liberty in description. If this is incorrect, please update the description to include 'nova version: ...'

tags: added: openstack-version.liberty
Revision history for this message
Matt Riedemann (mriedem) wrote :

I'm going to remove 'nova' from this since we can track the nova issue with bug 1597596. The powervm driver out of tree has fixed this independently.

no longer affects: nova
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.