Skip to content

fix(neutron-understack): select the ACTIVE port binding, not bindings[0] - #2464

Merged
cardoe merged 1 commit into
mainfrom
fix-port-binding
Oct 9, 2026
Merged

cardoe merged 1 commit into
mainfrom
fix-port-binding

Conversation

@cardoe

@cardoe cardoe commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Indexing port.bindings[0] assumes the binding order and picks the wrong
binding for a port with an INACTIVE binding alongside the ACTIVE one, as
happens during live migration.

Add utils.active_port_binding(), which wraps neutron-lib's
get_port_binding_by_status_and_host(), and use it in
parent_port_is_bound(), the trunk code and the undersync driver. A port
with no active binding is now reported as not bound.

Document the dict, OVO and SQLAlchemy model port representations and how
to select a binding from each in the Neutron networking design guide.

Today this has no impact on how our code runs but in the future with
centralized HA ports, we could have INACTIVE bindings where the port
currently does not live.

Indexing port.bindings[0] assumes the binding order and picks the wrong
binding for a port with an INACTIVE binding alongside the ACTIVE one, as
happens during live migration.

Add utils.active_port_binding(), which wraps neutron-lib's
get_port_binding_by_status_and_host(), and use it in
parent_port_is_bound(), the trunk code and the undersync driver. A port
with no active binding is now reported as not bound.

Document the dict, OVO and SQLAlchemy model port representations and how
to select a binding from each in the Neutron networking design guide.
@cardoe
cardoe requested a review from a team October 9, 2026 18:35
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

Python test results

497 tests   497 ✅  3s ⏱️
  1 suites    0 💤
  1 files      0 ❌

Results for commit c48fb5a.

@cardoe
cardoe added this pull request to the merge queue Oct 9, 2026
Merged via the queue into main with commit e04e45c Oct 9, 2026
71 checks passed
@cardoe
cardoe deleted the fix-port-binding branch October 9, 2026 19:35
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.

2 participants