Skip to content

vmware: Expose external customer traits #543

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

Open
wants to merge 1 commit into
base: stable/2023.2-m3
Choose a base branch
from

Conversation

joker-at-work
Copy link

With splitting up clusters into internal and external workloads using DRS HostGroups, we have to expose information to the scheduler which hosts can support external workloads. This could be done manually by adding the trait defined in
nova.utils.EXTERNAL_CUSTOMER_SUPPORTED_TRAIT to hosts, but that seems cumbersome and error-prone. Therefore, we detect HostGroups automatically through a naming convention and, if we find some, expose appropriate traits for them.

We expose traits per HostGroup so we can in the future also support customer-owned HVs where all VMs in a domain should only run on hosts dedicated to that customer. Having traits exposed for them allows us to filter in the scheduler.

We do not use the DRS_PREFIX for finding appropriate HostGroup objects, because these are managed by an external entity and not by Nova and thus should not be named with Nova's prefix.

We refresh the HostGroups every time we refresh the cluster resources. We also save the HostGroups in the VCState's stats, so we can use them later on e.g. if we want to scheduler manually instead of via DRS and when checking which VmGroup a VM should be put to during spawning/migrating.

Change-Id: Ic7da95442c99cc51798d3555325d477a0c4ce5ea

With splitting up clusters into internal and external workloads using
DRS HostGroups, we have to expose information to the scheduler which
hosts can support external workloads. This could be done manually by
adding the trait defined in
`nova.utils.EXTERNAL_CUSTOMER_SUPPORTED_TRAIT` to hosts, but that seems
cumbersome and error-prone. Therefore, we detect HostGroups
automatically through a naming convention and, if we find some, expose
appropriate traits for them.

We expose traits per HostGroup so we can in the future also support
customer-owned HVs where all VMs in a domain should only run on hosts
dedicated to that customer. Having traits exposed for them allows us to
filter in the scheduler.

We do not use the `DRS_PREFIX` for finding appropriate HostGroup
objects, because these are managed by an external entity and not by Nova
and thus should not be named with Nova's prefix.

We refresh the HostGroups every time we refresh the cluster resources.
We also save the HostGroups in the `VCState`'s stats, so we can use them
later on e.g. if we want to scheduler manually instead of via DRS and
when checking which VmGroup a VM should be put to during
spawning/migrating.

Change-Id: Ic7da95442c99cc51798d3555325d477a0c4ce5ea
@joker-at-work joker-at-work force-pushed the vmware-expose-external-customer-hostgroup-traits branch from 838dc9c to 4767161 Compare April 11, 2025 13:23
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