Skip to content

port: make hostID immutable#678

Merged
mandre merged 2 commits intok-orc:mainfrom
shiftstack:port-binding-immutable
Feb 6, 2026
Merged

port: make hostID immutable#678
mandre merged 2 commits intok-orc:mainfrom
shiftstack:port-binding-immutable

Conversation

@mandre
Copy link
Collaborator

@mandre mandre commented Feb 6, 2026

When a port with hostID set is attached to a server, OpenStack rebinds the port to the actual compute host, creating drift between the ORC spec and reality. The controller would then fight by trying to push the spec value back.

Make hostID immutable via CEL validation to prevent this inconsistency. Remove the now-dead hostID update path from the controller and the port-update-admin e2e test that exercised it.

Fixes #659.

When a port with hostID set is attached to a server, OpenStack rebinds
the port to the actual compute host, creating drift between the ORC
spec and reality. The controller would then fight by trying to push the
spec value back.

Make hostID immutable via CEL validation to prevent this inconsistency.
Remove the now-dead hostID update path from the controller and the
port-update-admin e2e test that exercised it.

Fixes k-orc#659.
@github-actions github-actions bot added the semver:patch No API change label Feb 6, 2026
@mandre mandre requested a review from winiciusallan February 6, 2026 13:15
@winiciusallan
Copy link
Contributor

winiciusallan commented Feb 6, 2026

Copying and pasting the comment from the related issue

@mandre I have a multinode environment and I can do the tests, but we don't use SRIOV, I don't know if this matters.

I believe it makes sense to have the field immutable for now. Let's also add a note for the potential drift if the user does not specify a scheduler hint. Wdyt? Making it immutable doesn't prevent the drift between spec and status.

Am I missing something?

Despite the comment, the changes look good to me.

Add a note to the hostID field documentation warning that OpenStack may
rebind the port to the server's actual compute host, which may differ
from the specified hostID if no matching scheduler hint is used.
@mandre
Copy link
Collaborator Author

mandre commented Feb 6, 2026

Despite the comment, the changes look good to me.

Good, I've added a comment explaining the host ID might differ in the status.

Copy link
Contributor

@winiciusallan winiciusallan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job!

@mandre mandre added this pull request to the merge queue Feb 6, 2026
Merged via the queue into k-orc:main with commit 0ff2b62 Feb 6, 2026
9 checks passed
@mandre mandre deleted the port-binding-immutable branch February 6, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver:patch No API change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Port binding hostID should be immutable when bound to a server

2 participants