-
Notifications
You must be signed in to change notification settings - Fork 596
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
[occm] Add Openstack server hostId as k8s node label #2579
Comments
This seems like a valid request from my point of view. @mdbooth, what do you think? @chess-knight: Are you planning to contribute implementation? |
@gryf, @stephenfin: This sounds like a low hanging fruit you can grab to get up to speed with CPO code. |
is hostid really available to normal user in openstack? I do not have access now to openstack, but if I remember correctly normal user cannot see that? |
According to our research in SovereignCloudStack/issues#540, hostId should be available for all users. You can see e.g. in the nova code, that it is supported from API version 2.62 https://opendev.org/openstack/nova/commit/c2f7d6585818c04e626aa4b6c292e5c2660cb8b3. |
actually I can see both |
Yes, exactly as I originally wrote in the issue, thanks. |
we are not using live migrations at all, so difficult to say how it works. |
IMHO the node controller should update node labels to reflect their current reality, i.e. a live migration will trigger node relabelling the next time the node is reconciled. Most things currently running on the Node are unlikely to act on it, but:
We should also validate this decision with the cloud-provider folks in case there are caveats we're not aware of. |
I'm very much in favour of adding a |
Is this a BUG REPORT or FEATURE REQUEST?:
/kind feature
What happened:
This issue follows a discussion in kubernetes-sigs/cluster-api-provider-openstack#1605, as a request to automatically label nodes with underlying hostId information, so e.g. workload can be scheduled on different physical hosts. It can be used as a topology differentiator when all other topology labels are the same.
Anything else we need to know?:
Issue kubernetes/cloud-provider#67 is closed and potentially resolved by kubernetes/kubernetes#123223 so now based on comment kubernetes/cloud-provider#67 (comment), AdditionalLabels with hostId information can be added to InstanceMetadata:
cloud-provider-openstack/pkg/openstack/instancesv2.go
Lines 136 to 142 in dab0f06
This information should be available in the server struct AFAIK, so there should not be too much work I think now.
One potential issue that I see is live migration, e.g. see #1801, where occm will have to update the label because hostId will change.
Environment:
The text was updated successfully, but these errors were encountered: