DVR-HA: Removing a router from an agent, does not clear the namespaces on the agent

Bug #1816698 reported by Swaminathan Vasudevan
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Swaminathan Vasudevan

Bug Description

Removing an active or a standby ha-router from an agent, does not clear the router namespace and the Snat namespaces.
This leads to sometimes having two Active HA routers and two 'ha-interface' in the snat namespace for DVR routers.
This can be very easily reproduced.

1. Create a HA-DVR router. ( minimum two node setup with 'dvr_snat' agent mode)
2. Attach interface to the router
3. Attach gateway to the router.
4. Now check the l3-agent-list-hosting-router for router.
5. Then remove the router from one of the agent ( l3-agent-router-remove )
6. Expected result is router namespace and snat namespace to be removed. ( But it is removed).
7. At the minimum we should clear the HA interfaces for that agent so that the HA router does not get into Active mode again.

This bug might have been introduced by this patch.
https://review.openstack.org/#/c/522362/7

This bug is seen since Ocata/Pike and probably also in master branch.

Changed in neutron:
status: New → Confirmed
importance: Undecided → High
Changed in neutron:
assignee: nobody → Swaminathan Vasudevan (swaminathan-vasudevan)
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/638566

Changed in neutron:
status: Confirmed → In Progress
Changed in neutron:
assignee: Swaminathan Vasudevan (swaminathan-vasudevan) → Brian Haley (brian-haley)
Changed in neutron:
assignee: Brian Haley (brian-haley) → Swaminathan Vasudevan (swaminathan-vasudevan)
Changed in neutron:
assignee: Swaminathan Vasudevan (swaminathan-vasudevan) → Brian Haley (brian-haley)
Changed in neutron:
assignee: Brian Haley (brian-haley) → Swaminathan Vasudevan (swaminathan-vasudevan)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

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

commit d9e0bab6acf6a608ed5bf32524c7d362f052a3ac
Author: Swaminathan Vasudevan <email address hidden>
Date: Thu Feb 21 17:14:03 2019 -0800

    DVR-HA: Unbinding a HA router from agent does not clear HA interface

    Removing an active or a standby HA router from an agent that has a
    valid DVR serviceable port (such as DHCP), does not remove the
    HA interface associated with the Router in the SNAT namespace.

    When we try to add the HA router back to the agent, then it
    adds more than one HA interface to the SNAT Namespace causing
    more problems and we sometimes also see multiple active routers.

    This bug might have been introduced by this patch [1].

    Fix the problem by just adding the router namespaces without HA
    interfaces when there is no HA and re-insert the HA interfaces
    when HA router is bound to the agent into the namespace.

    [1] https://review.openstack.org/#/c/522362/
    Closes-Bug: #1816698

    Change-Id: Ie625abcb73f8185bb2bee06dcd26a01d8af0b0d1

Changed in neutron:
status: In Progress → Fix Released
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.openstack.org/642304

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

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/642348

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

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/642357

tags: added: ocata-backport-potential pike-backport-potential queens-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/ocata)

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

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

This issue was fixed in the openstack/neutron 14.0.0.0b3 development milestone.

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

Reviewed: https://review.openstack.org/642304
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=3c66b1c45394ddb4b6bca757f3ce9d76caeeba85
Submitter: Zuul
Branch: stable/rocky

commit 3c66b1c45394ddb4b6bca757f3ce9d76caeeba85
Author: Swaminathan Vasudevan <email address hidden>
Date: Thu Feb 21 17:14:03 2019 -0800

    DVR-HA: Unbinding a HA router from agent does not clear HA interface

    Removing an active or a standby HA router from an agent that has a
    valid DVR serviceable port (such as DHCP), does not remove the
    HA interface associated with the Router in the SNAT namespace.

    When we try to add the HA router back to the agent, then it
    adds more than one HA interface to the SNAT Namespace causing
    more problems and we sometimes also see multiple active routers.

    This bug might have been introduced by this patch [1].

    Fix the problem by just adding the router namespaces without HA
    interfaces when there is no HA and re-insert the HA interfaces
    when HA router is bound to the agent into the namespace.

    [1] https://review.openstack.org/#/c/522362/
    Closes-Bug: #1816698

    Change-Id: Ie625abcb73f8185bb2bee06dcd26a01d8af0b0d1
    (cherry picked from commit d9e0bab6acf6a608ed5bf32524c7d362f052a3ac)

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

Reviewed: https://review.openstack.org/642348
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=2e033b3b0d57268856eb453802148129ebd0c954
Submitter: Zuul
Branch: stable/queens

commit 2e033b3b0d57268856eb453802148129ebd0c954
Author: Swaminathan Vasudevan <email address hidden>
Date: Thu Feb 21 17:14:03 2019 -0800

    DVR-HA: Unbinding a HA router from agent does not clear HA interface

    Removing an active or a standby HA router from an agent that has a
    valid DVR serviceable port (such as DHCP), does not remove the
    HA interface associated with the Router in the SNAT namespace.

    When we try to add the HA router back to the agent, then it
    adds more than one HA interface to the SNAT Namespace causing
    more problems and we sometimes also see multiple active routers.

    This bug might have been introduced by this patch [1].

    Fix the problem by just adding the router namespaces without HA
    interfaces when there is no HA and re-insert the HA interfaces
    when HA router is bound to the agent into the namespace.

    [1] https://review.openstack.org/#/c/522362/
    Closes-Bug: #1816698

    Change-Id: Ie625abcb73f8185bb2bee06dcd26a01d8af0b0d1
    (cherry picked from commit d9e0bab6acf6a608ed5bf32524c7d362f052a3ac)

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

Reviewed: https://review.openstack.org/642363
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=d145f978665cc2c3311a47f39b4ce5ad3712adff
Submitter: Zuul
Branch: stable/ocata

commit d145f978665cc2c3311a47f39b4ce5ad3712adff
Author: Swaminathan Vasudevan <email address hidden>
Date: Thu Feb 21 17:14:03 2019 -0800

    DVR-HA: Unbinding a HA router from agent does not clear HA interface

    Removing an active or a standby HA router from an agent that has a
    valid DVR serviceable port (such as DHCP), does not remove the
    HA interface associated with the Router in the SNAT namespace.

    When we try to add the HA router back to the agent, then it
    adds more than one HA interface to the SNAT Namespace causing
    more problems and we sometimes also see multiple active routers.

    This bug might have been introduced by this patch [1].

    Fix the problem by just adding the router namespaces without HA
    interfaces when there is no HA and re-insert the HA interfaces
    when HA router is bound to the agent into the namespace.

    [1] https://review.openstack.org/#/c/522362/
    Conflicts:
              neutron/agent/l3/agent.py
    Closes-Bug: #1816698

    Change-Id: Ie625abcb73f8185bb2bee06dcd26a01d8af0b0d1
    (cherry picked from commit d9e0bab6acf6a608ed5bf32524c7d362f052a3ac)

tags: added: in-stable-ocata
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 13.0.3

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

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

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

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

Reviewed: https://review.opendev.org/642357
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=4b49404aee88562f034104cccb3af9453ff45e81
Submitter: Zuul
Branch: stable/pike

commit 4b49404aee88562f034104cccb3af9453ff45e81
Author: Swaminathan Vasudevan <email address hidden>
Date: Thu Feb 21 17:14:03 2019 -0800

    DVR-HA: Unbinding a HA router from agent does not clear HA interface

    Removing an active or a standby HA router from an agent that has a
    valid DVR serviceable port (such as DHCP), does not remove the
    HA interface associated with the Router in the SNAT namespace.

    When we try to add the HA router back to the agent, then it
    adds more than one HA interface to the SNAT Namespace causing
    more problems and we sometimes also see multiple active routers.

    This bug might have been introduced by this patch [1].

    Fix the problem by just adding the router namespaces without HA
    interfaces when there is no HA and re-insert the HA interfaces
    when HA router is bound to the agent into the namespace.

    [1] https://review.openstack.org/#/c/522362/
    Conflicts:
              neutron/agent/l3/agent.py
    Closes-Bug: #1816698

    Change-Id: Ie625abcb73f8185bb2bee06dcd26a01d8af0b0d1
    (cherry picked from commit d9e0bab6acf6a608ed5bf32524c7d362f052a3ac)

tags: added: in-stable-pike
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron ocata-eol

This issue was fixed in the openstack/neutron ocata-eol release.

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

This issue was fixed in the openstack/neutron pike-eol release.

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.