VRF router interface attach does not sync bound baremetal port physnets

Open
#2,240 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
networking

Research direction

Start with neutron_understack/tests/scenarios/test_vrf_router_interface.py::TestVrfRouterInterface::test_vrf_router_interface_syncs_bound_port_physnets and inspect the VRF router-interface path in neutron_understack_mech/routers. Run scenario VRF-RTR-01 to confirm the missing sync calls for physnet1 and physnet2. Done means the strict xfail can be removed and the test passes with both bound-port physnets synchronized.

Written by the indexing model from the issue text.

Description

Summary

Attaching a VRF (flavored) router interface to a network does not reconcile
the switches carrying that network's already-bound baremetal ports. undersync
is never asked to sync those ports' physical_networks, so the fabric is left
unaware that the network now has a router.

Component: python/neutron-understackneutron_understack_mech / routers
Severity: Medium — baremetal ports on a network keep stale switch config
after a router is attached, until some other event happens to re-sync them.

Details

When a network has baremetal ports bound to one or more physnets (each with a
dynamic VLAN segment), and a VRF router is then attached to that network on the
internal side, no undersync.sync(<physnet>) call is made for those physnets.

For a flavored (VRF) router, routers.create_port_postcommit returns early
(it skips the OVN/uplink path for flavored routers), and nothing on the
router-interface path syncs the physnets of the ports already on the network.
The router-interface port itself is not a baremetal port, so
update_port_postcommit does not sync either.

Impact

Baremetal ports already present on a network do not get their switches
reconciled when a VRF router is attached. The switch configuration for those
physnets can be stale relative to the new L3 topology until an unrelated event
triggers a resync.

Steps to reproduce

Covered by
neutron_understack/tests/scenarios/test_vrf_router_interface.py::TestVrfRouterInterface::test_vrf_router_interface_syncs_bound_port_physnets
(scenario VRF-RTR-01), currently @pytest.mark.xfail(strict=True):

  1. Create a VXLAN network + subnet.
  2. Bind two baremetal ports on the network to different physnets
    (physnet1, physnet2).
  3. Create a VRF router and attach the subnet on the internal side.
  4. Expected: undersync.sync is called for physnet1 and physnet2.
    Actual: undersync.sync is not called for either.

Fix direction

On VRF router-interface attach, sync each physnet carrying a bound baremetal
port on the network so the switches are reconciled for the new router. When
fixed, remove the xfail on VRF-RTR-01 (strict xfail will otherwise start
failing to remind you).

Dominant language
Python
Stars
13
Forks
12
Avg merge
1d 9h
Merged PRs (30d)
73

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rackerlabs/understack

All issues in rackerlabs/understack

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.