router uplink dynamic VLAN segment leaked on interface removal

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

Nobody has claimed this yet.

Assessment

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

Research direction

Start in neutron_understack/routers.py at _do_uplink_cleanup, then read neutron_understack/tests/scenarios/test_router_uplink.py and scenario OVN-ROUTER-DETACH-01. Run that scenario to confirm the strict xfail currently fails; done means the allocated VLAN segment is absent after remove_router_interface and the strict xfail can be removed.

Written by the indexing model from the issue text.

Description

Summary

The router uplink teardown leaks the dynamically allocated VLAN segment.
When a router interface is removed (or the router is deleted),
neutron_understack.routers._do_uplink_cleanup deletes the network-node
trunk subport, the OVN localnet + shared-port LSPs, and the shared neutron
port — but it never releases the dynamic VLAN segment that
fetch_or_create_router_segment allocated on the network-node physnet. The
segment (and its VLAN id) leaks on every router-interface removal / router
delete.

Component: python/neutron-understackneutron_understack.routers
Severity: Medium — VLAN id exhaustion on the network-node physnet over time.

Reproduction

Scenario OVN-ROUTER-DETACH-01
(neutron_understack/tests/scenarios/test_router_uplink.py) asserts the
segment is released after remove_router_interface, marked
xfail(strict=True). It fails without the fix: the segment
(network_type=vlan, the network-node physnet) is still present after
teardown.

Fix direction

In _do_uplink_cleanup, after deleting the shared port, release the segment
if unused (mirroring the baremetal delete path):
release_segment_if_unused(network_segment_by_id(segment_id)). A fix branch
implementing this exists; merging it flips the strict xfail to a pass,
prompting removal of the marker.

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.