IPv6 not set on VMs when using DVR HA + SLAAC/SLAAC (or DHCPv6 stateless)

Bug #1934666 reported by Weronika Sikora
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Confirmed
Medium
Unassigned

Bug Description

Hi, I think I've encountered a bug in DVR HA + IPv6 SLAAC, but I'd greatly appreciate it if someone could confirm it on their infra (in case I've made a mistake in my Devstack configs). I also have a suggestion regarding Tempest blacklist/whitelist, as tests that could catch this issue are not running on the affected L3 config.

My setup:
- multinode Devstack Stein (OVS) - contr + 2 computes
- DVR HA router
- private subnet SLAAC/SLAAC (note: DHCPv6 stateless is also affected since it also uses radvd), network type vxlan
- 2 instances on separate nodes

I'm using tempest.scenario.test_network_v6.TestGettingAddress.test_slaac_from_os to test this.

There seems to be an issue with setting IPv6 address on the instance when using a SLAAC/SLAAC subnet (and by extension, DHCPv6 stateless subnet) + DVR HA router. The IPv6 is set only on the instance that's placed on the same node as the Master router. Instances placed on nodes with Backup router have no IPv6 set on their interfaces.

This issue happens only to DVR HA routers. Legacy, legacy HA and DVR no-HA work correctly.

radvd is running only on the node with Master router (as it should), in the qrouter namespace. RAs reach the local VM via qr if -> tap if (I think?). RAs also manage to reach other nodes via br-tun, but I think I see them dropped by a flow in br-int on destination nodes. They don't reach the tap interfaces.
So the traffic maybe goes like this: (?)
qr if in qrouter ns -> br-int -> br-tun -> RAs reach the other node -> br-tun -> br-int (and get dropped here, I think in table 1)

The path these RAs take in br-tun (on dest node) seem to be slightly different depending on the router type (legacy HA vs DVR HA). I have no idea if this is important, but I'm dropping this here just in case:

Legacy HA:
RAs enter table 9 (path from table 0 to 9 is identical in both cases). They are resubmitted to table 10, then go through a learn flow that also outputs traffic to br-int:

cookie=0xe3d0b08836a75945, duration=88239.681s, table=10, n_packets=8649, n_bytes=528332, priority=1 actions=learn(table=20,hard_timeout=300,priority=1,cookie=0xe3d0b08836a75945,NXM_OF_VLAN_TCI[0..11],NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[],load:0->NXM_OF_VLAN_TCI[],load:NXM_NX_TUN_ID[]->NXM_NX_TUN_ID[],output:OXM_OF_IN_PORT[]),output:"patch-int"

DVR HA:
RAs enter table 9. They go through a flow that outputs traffic to br-int:

cookie=0xe3d0b08836a75945, duration=88218.262s, table=9, n_packets=600, n_bytes=56004, priority=1,dl_src=fa:16:3f:68:d6:f0 actions=output:"patch-int"

One note - radvd complains that forwarding flag in qrouter ns is set to 0 with DVR HA (no complains in logs for other router types). I've checked flags for forwarding and accept_ra, set some to 2 as per Pike docs (I couldn't find anything more recent), but it didn't help.
Another note - the code seems to be setting these flags in the namespace where HA interface resides. This means that they're set in the snat namespace when using DVR HA, but radvd is still running in qrouter ns. Is it intended to be like this?

As for my suggestion:
I've noticed that the Zuul job responsible for multinode-dvr-ha-full is not running the tests that could catch this issue, namely:
tempest.scenario.test_network_v6.TestGettingAddress
These tests are ran on the ipv6-only job, but since it's set to use legacy routers by default, everything works fine there.
I propose to add these tests to the multinode-dvr-ha-full job to test IPv6 + SLAAC with DVR HA routers. (I have no idea where these test lists are generated for Zuul jobs, so I don't know in which repo the patch should be made)
Since Tempest uses tags, it'd be done for Master only.

I've tested this on Stein, but I've quickly stacked Master multinode (using OVS) to check and I think it's happening there as well.

description: updated
Revision history for this message
Bence Romsics (bence-romsics) wrote :

Thank you for the very detailed bug report! I will build a devstack environment to try to reproduce this, but that will take me some time. Until then do you maybe know which flow dropped the RAs?

Revision history for this message
LIU Yulong (dragon889) wrote :

radvd will be run on all dvr_local_router (qrouter in compute node) nodes. I can tcpdump RA packets inside the VM locally:
14:30:19.166214 fa:16:3e:10:65:1e > 33:33:00:00:00:01, ethertype IPv6 (0x86dd), length 118: fe80::f816:3eff:fe10:651e > ff02::1: ICMP6, router advertisement, length 64

I guess your 2 compute nodes here are all set dvr_snat to l3_agent mode. Maybe this is another issue of mixed case of running compute and dvr_snat. Could you please try this type of install:
* one controller
* two compute nodes with l3_agent_mode = dvr
* two network nodes with l3_agent_mode = dvr_snat

Then to see if it works.

Revision history for this message
Weronika Sikora (shushuda) wrote (last edit ):

Iirc I think it was this flow, it's in br-int in table 1 on nodes with backup router state:

~$ sudo ovs-ofctl dump-flows br-int table=1
( ... )
 cookie=0x7690f61f62d8f3d3, duration=298834.053s, table=1, n_packets=7373, n_bytes=833646, priority=1 actions=drop

What do you mean by "all dvr_local_router (qrouter in compute node) nodes"? Because, according to [1], both legacy HA and DVR HA run radvd only on the node where the router is in Master/Primary state. Do you mean that radvd would also be ran on nodes with L3 agent_mode set to dvr and only "skip" nodes with dvr_snat mode + backup router state?

Yes, all my nodes are running L3 agents with agent_mode = dvr_snat. My control runs q-svc, OVS and L3, while both computes run OVS and L3.

And sure, I can try this install.

[1] https://github.com/openstack/neutron/blob/074c131b570adb60150ea25d7cec2367ee963ac2/neutron/agent/l3/ha_router.py#L528

Revision history for this message
Weronika Sikora (shushuda) wrote :

I've checked it on the install you requested. You were right, it's working correctly when computes are running with L3 agent_mode = dvr. It breaks when the compute node is running with L3 agent_mode = dvr_snat.

LIU Yulong (dragon889)
Changed in neutron:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
LIU Yulong (dragon889) wrote :

Thank you Weronika for the testing. Runing the compute service with dvr_snat mode for L3 agent has some known issues, like the ingress flooding on br-int, packet drop on nodes, gateway MAC miss learning and so on. They are all not easily to fix, especially for DVR+HA routers.
But for this issue here, IMO, maybe spawn radvd process in all node can solve the problem. Remove the "master" check can be a simple way, (aka a revert for [2]). Please have a try for that.

[1] https://github.com/openstack/neutron/blob/master/neutron/agent/l3/ha_router.py
[2] https://github.com/openstack/neutron/commit/2f9b0ce940099bcc82d2940b99bdc387db22d6fc

Revision history for this message
Weronika Sikora (shushuda) wrote :

I can try that. But wouldn't it reintroduce the issues listed in its commit message?

Changed in neutron:
assignee: nobody → Weronika Sikora (shushuda)
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/+/800972

Changed in neutron:
status: Confirmed → In Progress
Revision history for this message
Rodolfo Alonso (rodolfo-alonso-hernandez) wrote :

Hello:

As Liu commented in c#2, radvd will run in "dvr_local" mode (in the compute nodes). "dvr_snat" node is only for network nodes; no compute service should be deployed on those nodes [1].

I don't think we should support this feature and we should not spawn the radvd daemon on node that should not host any VM.

Regards.

[1]https://docs.openstack.org/neutron/pike/admin/deploy-ovs-ha-dvr.html

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
Bence Romsics (bence-romsics) wrote :

Sorry for forgetting to bring this to the meeting. I pushed a patch to make the docs better.

Revision history for this message
Bence Romsics (bence-romsics) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by "Weronika Sikora <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/neutron/+/800972
Reason: It was decided during a meeting that dvr_snat mode is unsupported on Compute nodes, which makes this patch not longer needed. Please refer to the bug report from the commit message for more info as well as the link to the logs of the IRC meeting.

Changed in neutron:
assignee: Weronika Sikora (shushuda) → nobody
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

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

commit 45a33dcb0a5e58c3f4f9e51fdfae01fae6dd6709
Author: Bence Romsics <email address hidden>
Date: Tue Jul 20 17:11:34 2021 +0200

    doc: Do not use dvr_snat on computes

    Change-Id: I1194d9995c16c1e178026986d9465aa09c1529c8
    Closes-Bug: #1934666

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 19.0.0.0rc1

This issue was fixed in the openstack/neutron 19.0.0.0rc1 release candidate.

Revision history for this message
Arnaud Morin (arnaud-morin) wrote (last edit ):

I noticed today while working on another patch (see [1]) that devstack multinode is relying on dvr_snat on compute node (minion1 and minion2 are in dvr_snat, so acting as network+compute nodes).

As per the fix on this bug, this is not supported.

[1] https://review.opendev.org/c/openstack/neutron/+/869741

Changed in neutron:
status: Fix Released → New
Revision history for this message
Rodolfo Alonso (rodolfo-alonso-hernandez) wrote :

In CI job "neutron-ovs-tempest-dvr-ha-multinode-full", we are still configuring the compute node with "agent_mode: dvr_snat" [1].

[1]https://github.com/openstack/neutron/blob/f8121ee981888179e785ba509263273f75b5ed6d/zuul.d/tempest-multinode.yaml#L153

yatin (yatinkarel)
Changed in neutron:
status: New → Confirmed
Revision history for this message
Rodolfo Alonso (rodolfo-alonso-hernandez) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (master)

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

commit 169ef0558926656fe9ef38fea42dcada2786ae0d
Author: Slawek Kaplonski <email address hidden>
Date: Tue Feb 21 09:18:51 2023 +0100

    Change neutron-ovs-tempest-dvr-ha-multinode-full job's config

    Now this job runs on 3 nodes:

    * 1 main, controller and networker like, without nova-compute service on
      it, this node has "dvr_snat" set as L3 agent's mode,
    * 2 compute like nodes with nova compute and L3 agent in "dvr" mode

    Even though there is only one "dvr_snat" node in the job, it keeps
    "l3_ha" option set to "true" in Neutron's config. That way we are still
    testing "ha" code path of the centralized part of the router but also
    job is now closer to the real life, and supported deployments topology.

    Additionally this patch adds nodeset for 3 nodes with Ubuntu Jammy and
    controller node not running compute service as there is no such nodeset
    defined globally.

    Related-Bug: #1934666

    Change-Id: Id6a91795ebc73be26bb34d9eaf8a53b2b6a1ba0c

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.