generated from cobaltcore-dev/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 4
Use hypervisor CRD for filtering #441
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1ba662b to
44fdd71
Compare
This was referenced Dec 23, 2025
Contributor
Test Coverage ReportTest Coverage 📊: 65.6% |
SoWieMarkus
approved these changes
Jan 5, 2026
PhilippMatthes
added a commit
to cobaltcore-dev/openstack-hypervisor-operator
that referenced
this pull request
Jan 7, 2026
## Background In [this pull request](cobaltcore-dev/cortex#441) we implemented a cortex filtering pipeline for KVM. This pipeline uses the hypervisor CRD as single source of truth to find out on which hypervisors a vm can be scheduled. To complete this implementation, we need to extend the hypervisor CRD. ## Tasks Support filtering based on hypervisor type and other capabilities: - [x] The capabilities struct should be extended to support the hypervisor type. Later, we will probably need to extend this struct further. - [x] Add fields for supported devices (e.g. video device), cpu modes, and features (for migration filtering) Capacity filtering: - [x] We need a spec + status not only for the size of the host, but also for the currently used capacity. This will be used by cortex to filter out hosts without the required capacity. This scheduling logic can be made more intelligent in the future, by mapping out individual numa cells and including reserved capacity. Pinned projects: - [x] Provide a spec to declare pinned projects on this hypervisor. (Bonus) - [x] Add numa cell capacity & allocation information so we can implement numa sensitive initial placement When finished: - [x] Ensure backwards compatibility so we can roll this out without any issues ## Dependencies > [!NOTE] > The scope of this PR is to establish a minimum viable scheduling pipeline in cortex, with the least amount of changes possible. Refactorings of the hypervisor crd spec can follow if needed. KVM node agent PR: cobaltcore-dev/kvm-node-agent#40
PhilippMatthes
added a commit
to cobaltcore-dev/kvm-node-agent
that referenced
this pull request
Jan 7, 2026
In [this pull request](cobaltcore-dev/cortex#441) we implemented a cortex filtering pipeline for KVM. This pipeline uses the hypervisor CRD as single source of truth to find out on which hypervisors a vm can be scheduled. To complete this implementation, we extended the hypervisor crd in [this pull request](cobaltcore-dev/openstack-hypervisor-operator#217). The hypervisor crd pull request added additional fields and removed outdated ones, which need to be autodiscovered in the kvm node agent. The following fields are now populated: Support filtering based on hypervisor type and other capabilities: - [x] Export the hypervisor type, architecture, supported devices, supported cpu modes, and supported features Capacity filtering: - [x] Aggregate the allocated and total available capacity and populate the corresponding fields (Bonus) - [x] Add numa cell capacity & allocation information so we can implement numa sensitive initial placement When done: - [x] Test with ssh-forwarded libvirt socket > [!NOTE] > The scope of this PR is to establish a minimum viable scheduling pipeline in cortex, with the least amount of changes possible. Refactorings of the hypervisor crd spec can follow if needed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
For virtual machines spawned on the kvm hypervisor, we want to no longer use nova and placement as source of truth. Instead, filters should use the hypervisor crd exposed by the hypervisor operator and populated by the node agent. This contribution replaces the implementation of all filters that were originally ported from nova accordingly. Afterward, we can disable filters in nova one-by-one, moving the compute placement logic over to cortex.
Tip
You can use the newly added mirror tool to mirror hypervisor resources from our compute cluster over to the local cluster.
Completion
internal/scheduling/decisions/nova/plugins/filters/filter_compute_capabilities.go(REMOVED)internal/scheduling/decisions/nova/plugins/filters/filter_project_aggregates.go(REMOVED)internal/scheduling/decisions/nova/plugins/filters/filter_disabled.go(REMOVED)Dependencies
Note
The scope of this PR is to establish a minimum viable scheduling pipeline with the current state. Extensive refactorings, for example of the filter for requested traits, are out of scope.
Hypervisor operator PR: cobaltcore-dev/openstack-hypervisor-operator#217
KVM node agent PR: cobaltcore-dev/kvm-node-agent#40