The qrouter-namespace will appear duplicate route entry when add a route rule to HA router

Bug #1927849 reported by yangjianfeng
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Undecided
Unassigned

Bug Description

I create a HA router add add a subnet to it.
And then I create a route rule, like below:
# openstack router set bf1bf970-7676-4015-816d-868e3609cce6 --route destination=2.2.2.0/24,gateway=10.20.30.5

At this time to see the qrouter-namespace, like below:
# ip netns exec qrouter-bf1bf970-7676-4015-816d-868e3609cce6 ip r
default via 172.24.4.1 dev qg-38b5325e-4c proto 112
default via 172.24.4.1 dev qg-38b5325e-4c proto static
2.2.2.0/24 via 10.20.30.5 dev qr-75b4e839-b4 proto 112
2.2.2.0/24 via 10.20.30.5 dev qr-75b4e839-b4 proto static
10.20.30.0/24 dev qr-75b4e839-b4 proto kernel scope link src 10.20.30.1
169.254.0.0/24 dev ha-6ce1fcf8-98 proto kernel scope link src 169.254.0.22
169.254.192.0/18 dev ha-6ce1fcf8-98 proto kernel scope link src 169.254.194.210
172.24.4.0/24 dev qg-38b5325e-4c proto kernel scope link src 172.24.4.83

Some route entries appear twice.

The I delete the route rule, like below:
# openstack router set bf1bf970-7676-4015-816d-868e3609cce6 --no-route

The qrouter-namespace will remain a invalid route entry:
# ip netns exec qrouter-bf1bf970-7676-4015-816d-868e3609cce6 ip r
default via 172.24.4.1 dev qg-38b5325e-4c proto 112
default via 172.24.4.1 dev qg-38b5325e-4c proto static
2.2.2.0/24 via 10.20.30.5 dev qr-75b4e839-b4 proto static
10.20.30.0/24 dev qr-75b4e839-b4 proto kernel scope link src 10.20.30.1
169.254.0.0/24 dev ha-6ce1fcf8-98 proto kernel scope link src 169.254.0.22
169.254.192.0/18 dev ha-6ce1fcf8-98 proto kernel scope link src 169.254.194.210
172.24.4.0/24 dev qg-38b5325e-4c proto kernel scope link src 172.24.4.83

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

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/neutron/+/790352

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

Reviewed: https://review.opendev.org/c/openstack/neutron/+/790352
Committed: https://opendev.org/openstack/neutron/commit/f192153b449877e00c57c2b2a1b8ce89c9c733da
Submitter: "Zuul (22348)"
Branch: master

commit f192153b449877e00c57c2b2a1b8ce89c9c733da
Author: yangjianfeng <email address hidden>
Date: Sun May 9 06:28:06 2021 +0000

    HA-non-DVR router don't need manually add static route

    When a router set as HA mode, The keepalived process will take over
    the route entry's generation. So, the codes that add static route
    is redundant.

    But, for DVR-HA router, in dvr_snat node the keepalived process run
    in snat-namespace and don't take over qrouter-namespace, so the
    manually add static route codes still need be called.

    Closes-Bug: #1927849
    Change-Id: Id09de6c43c0fab4009336e253c88f54219398053

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

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/neutron/+/792874

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

Fix proposed to branch: stable/victoria
Review: https://review.opendev.org/c/openstack/neutron/+/792875

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

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/c/openstack/neutron/+/792876

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

Reviewed: https://review.opendev.org/c/openstack/neutron/+/792874
Committed: https://opendev.org/openstack/neutron/commit/f29641a7f7d1cca32c7d9f011981e076b5906fed
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit f29641a7f7d1cca32c7d9f011981e076b5906fed
Author: yangjianfeng <email address hidden>
Date: Sun May 9 06:28:06 2021 +0000

    HA-non-DVR router don't need manually add static route

    When a router set as HA mode, The keepalived process will take over
    the route entry's generation. So, the codes that add static route
    is redundant.

    But, for DVR-HA router, in dvr_snat node the keepalived process run
    in snat-namespace and don't take over qrouter-namespace, so the
    manually add static route codes still need be called.

    Closes-Bug: #1927849
    Change-Id: Id09de6c43c0fab4009336e253c88f54219398053
    (cherry picked from commit f192153b449877e00c57c2b2a1b8ce89c9c733da)

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

Reviewed: https://review.opendev.org/c/openstack/neutron/+/792875
Committed: https://opendev.org/openstack/neutron/commit/531cb5bef7b5943fff7a2efa4c92fb304193b514
Submitter: "Zuul (22348)"
Branch: stable/victoria

commit 531cb5bef7b5943fff7a2efa4c92fb304193b514
Author: yangjianfeng <email address hidden>
Date: Sun May 9 06:28:06 2021 +0000

    HA-non-DVR router don't need manually add static route

    When a router set as HA mode, The keepalived process will take over
    the route entry's generation. So, the codes that add static route
    is redundant.

    But, for DVR-HA router, in dvr_snat node the keepalived process run
    in snat-namespace and don't take over qrouter-namespace, so the
    manually add static route codes still need be called.

    Closes-Bug: #1927849
    Change-Id: Id09de6c43c0fab4009336e253c88f54219398053
    (cherry picked from commit f192153b449877e00c57c2b2a1b8ce89c9c733da)

tags: added: in-stable-victoria
tags: added: neutron-proactive-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 17.2.0

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

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

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

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers