when the last vm of a network in a compute is live-migrated with DVR enable, the qrouter namespace is not deleted

Bug #1825205 reported by Slawek Kaplonski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Slawek Kaplonski

Bug Description

Router with DVR, when last vm connected to subnet is live-migrated from compute node to another compute node, qrouter- namespace isn't cleaned.
In similar situation when VM is migrated with "nova migrate" (cold migration) or removed than qrouter- namespace is removed properly from compute node.

Revision history for this message
Slawek Kaplonski (slaweq) wrote :

It looks like this issue is caused by multiple port binding feature. It happens like that because in https://github.com/openstack/neutron/blob/c21d922abd1208a72fe64d404a8eab93e0c56870/neutron/db/l3_dvrscheduler_db.py#L438 port is still visible on old host as INACTIVE. But ports in such state aren't filtered out from the list, so there is still serviceable port on old host and there is no any router to remove found.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

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

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

Reviewed: https://review.opendev.org/653746
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=ba600a32a542ffcb95b84e5e413f1595c25ca7dd
Submitter: Zuul
Branch: master

commit ba600a32a542ffcb95b84e5e413f1595c25ca7dd
Author: Slawek Kaplonski <email address hidden>
Date: Thu Apr 18 16:34:26 2019 +0200

    Don't count ports with inactive bindings as serviceable dvr ports

    In case of live migration, binding of port on src host is first switched
    to be INACTIVE and then L3 agent should remove qrouter namespace from
    compute node if that was last port connected to this router on host.
    Because of bug which didn't check if port which is on host has ACTIVE
    or INACTIVE binding, router namespace wasn't cleaned properly.
    Now it is cleaned as only ports with ACTIVE binding are count
    as serviceable ports on compute node.

    Change-Id: I01173ad64a19fc05a888c601b81ec097d579a7cf
    Closes-Bug: #1825205

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/stein)

Fix proposed to branch: stable/stein
Review: https://review.opendev.org/657555

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.opendev.org/657556

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/stein)

Reviewed: https://review.opendev.org/657555
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=3b8f7a01793531e1a53005b77a320b261c53916f
Submitter: Zuul
Branch: stable/stein

commit 3b8f7a01793531e1a53005b77a320b261c53916f
Author: Slawek Kaplonski <email address hidden>
Date: Thu Apr 18 16:34:26 2019 +0200

    Don't count ports with inactive bindings as serviceable dvr ports

    In case of live migration, binding of port on src host is first switched
    to be INACTIVE and then L3 agent should remove qrouter namespace from
    compute node if that was last port connected to this router on host.
    Because of bug which didn't check if port which is on host has ACTIVE
    or INACTIVE binding, router namespace wasn't cleaned properly.
    Now it is cleaned as only ports with ACTIVE binding are count
    as serviceable ports on compute node.

    Change-Id: I01173ad64a19fc05a888c601b81ec097d579a7cf
    Closes-Bug: #1825205
    (cherry picked from commit ba600a32a542ffcb95b84e5e413f1595c25ca7dd)

tags: added: in-stable-stein
tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/rocky)

Reviewed: https://review.opendev.org/657556
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=d3c757134dfb20d0e5755447918e3fc6b413f7d8
Submitter: Zuul
Branch: stable/rocky

commit d3c757134dfb20d0e5755447918e3fc6b413f7d8
Author: Slawek Kaplonski <email address hidden>
Date: Thu Apr 18 16:34:26 2019 +0200

    Don't count ports with inactive bindings as serviceable dvr ports

    In case of live migration, binding of port on src host is first switched
    to be INACTIVE and then L3 agent should remove qrouter namespace from
    compute node if that was last port connected to this router on host.
    Because of bug which didn't check if port which is on host has ACTIVE
    or INACTIVE binding, router namespace wasn't cleaned properly.
    Now it is cleaned as only ports with ACTIVE binding are count
    as serviceable ports on compute node.

    Change-Id: I01173ad64a19fc05a888c601b81ec097d579a7cf
    Closes-Bug: #1825205
    (cherry picked from commit ba600a32a542ffcb95b84e5e413f1595c25ca7dd)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 13.0.4

This issue was fixed in the openstack/neutron 13.0.4 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 14.0.2

This issue was fixed in the openstack/neutron 14.0.2 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 15.0.0.0b1

This issue was fixed in the openstack/neutron 15.0.0.0b1 development milestone.

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.