Skip to content

feat(neutron-understack): own trunk status and subport ownership - #2492

Draft
cardoe wants to merge 2 commits into
mainfrom
trunk-status-ownership
Draft

cardoe wants to merge 2 commits into
mainfrom
trunk-status-ownership

Conversation

@cardoe

@cardoe cardoe commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • neutron-understack: the trunk driver now owns the status of baremetal trunks and the device_owner/status of their subports. ml2/ovn is about to stop managing trunks whose parent LSP is type=external, which is every baremetal parent (LP #2167105). A trunk is ACTIVE once its parent is bound and the undersync driver's handler for the event has run, and DOWN otherwise. Subports follow their trunk. Trunks on any other kind of parent stay ml2/ovn's.
  • kubectl-us: adds net trunk audit and repair.

Notes

  • Undersync does not report back, so ACTIVE means a sync was requested, not that the fabric was confirmed to carry the subports. Correcting status after the fact is intended to be handled by an out-of-band reconciler, which is not part of this PR.
  • The trunk driver stays decoupled from Undersync. Its status handlers subscribe at STATUS_EVENT_PRIORITY (above the undersync driver's), and a test guards that ordering.

Test plan

  • uv run pytest in python/neutron-understack (472 passed, 5 xfailed on existing tracked bugs)
  • uv run ruff check / ruff format
  • Verify against a dev cluster with a baremetal trunk

ml2/ovn is about to stop managing trunks whose parent LSP is
type=external, which is every baremetal parent (LP #2167105). It was the
only thing moving our trunks out of DOWN and claiming their subports, so
do both here: ACTIVE once the parent is bound and the undersync driver's
handler for the event has run, otherwise DOWN. Subports follow their
trunk. A trunk on any other kind of parent stays ml2/ovn's.

Undersync does not report back, so ACTIVE means a sync was requested,
not that the fabric was confirmed to carry the subports. Correcting
status after the fact is left to an out-of-band reconciler.
ml2/ovn wrote parent_name/tag into every baremetal trunk subport's binding
profile and LSP, where they mean nothing: undersync programs the leaf
switch. LP #2167105 stops it writing them but leaves the rows it already
wrote, since the code that removed them on subport delete now returns early.

The binding profile is the source of truth -- ml2/ovn derives the LSP's
parent_name/tag from it -- so dropping those keys through Neutron makes it
rewrite the LSP itself; ovn-nbctl clear only mops up what it misses. Trunk
status is audit-only, as the Neutron API does not accept it.
@github-actions

Copy link
Copy Markdown

Python test results

799 tests   799 ✅  8s ⏱️
  1 suites    0 💤
  1 files      0 ❌

Results for commit 95993e4.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant