-
Notifications
You must be signed in to change notification settings - Fork 34
Port: change hostID to struct with id and serverRef fields #646
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This changes the Port API to use a structured hostID field instead of a simple string, allowing users to specify the host ID either directly or by referencing a Server resource.
|
@winiciusallan I'd like your feedback on this. Related to my concerns in #626. |
|
@mandre I have some questions just to clarify my thoughts and to ensure that we're on the same page. Could you point out a use case where I would retrieve the host ID from a running server? Making some tests on my multinode environment, if I do: create port A binded to host A -> create a server with port A into host B Openstack will change the binding:host_id to the host B on port A, because to a port become UP as long as I know, it must be attached on the same host as the VM. So, now I'm wondering if we really want to expose this field and if a use case for that exists. |
Port Binding is for pass-through scenarios (think SR-IOV), where only a subset of hosts would have SR-IOV capable NICs for example. From a user perspective, you can only get the hostID from an existing server, so it would make sense to reference a server when creating a port bound to a hostID. The use case would be:
I think we still want to leave the literal id as an option, in case the user already knows the host ID. |
|
Thanks for the detailed explanation.
Yeah, that's true, we already discussed this indeed.
Got it. I'd add in somewhere saying that the hostID from port doesn't affect the schedule of the server, as you can see in the test I made in the first comment, so I'm afraid to have a inconsistency state. So imagine:
And in the port spec, we have compute1 still. Am I thinking correctly? |
I believe you're right. But we have an identical problem if you pass the ID directly rather than a server ref. So perhaps we need to make hostID immutable? |
This changes the Port API to use a structured hostID field instead of a simple string, allowing users to specify the host ID either directly or by referencing a Server resource.