[occm] Add OpenStack server host ID as node label - #3166
Conversation
|
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Welcome @stblatzheim! |
|
Hi @stblatzheim. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/ok-to-test |
|
while this looks like a desired feature, I saw a lot of discussions in the linked issue about the capacity of reconciling node labels to avoid drift in case, for example, the instance has been migrated. doesn't the node controller handle label reconciling? |
|
@winiciusallan I think reconciling node labels is out of scope here. Also the affinitys for scheduling pods are done at pod creation time => Even a changed node label afterwards would just be taken into account for new pods. Maybe we can raise a new issue for updating node label on reconcile afterwards, atm we don't even have node labels to work on ... |
there could be system migration to drain the hypervisor for maintenance on the openstack level. |
|
You are right that an OpenStack operator may live-migrate instances while I checked the current cloud-node-controller implementation used here Therefore, this PR provides the OpenStack-specific desired state and labels There is no strict runtime dependency between the two changes: the generic There have already been two upstream attempts addressing this: This also matches the previous conclusion in #2579 that exposing HostID is an Existing pods will still not be automatically rescheduled after a migration, Would you be comfortable merging this provider-side prerequisite while the |
|
@stblatzheim I don't mind merging this right now. Need to discuss this with other maintainers |
What this PR does / why we need it:
Adds the OpenStack server
hostIdas thetopology.openstack.org/host-idKubernetes node label when Novareturns a non-empty value.
The label provides a project-scoped, opaque representation of the
underlying compute host. It can be used with topology spread
constraints and pod anti-affinity to distribute workloads across
different OpenStack compute hosts.
The label is applied during cloud node initialization. It is currently
not reconciled after a live migration, which is documented as a known
limitation.
This PR supersedes #2628 and incorporates the latest review feedback.
Credit for the original implementation goes to @chess-knight.
Which issue this PR fixes:
Fixes #2579
Special notes for reviewers:
@kayrus as requested a new PR with the requested changes - original PR was #2628
Release note: