Skip to content

feat(module): detect nodes with enabled /dev/kvm to schedule virt-handlers #1076

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 9 commits into from
Jun 19, 2025

Conversation

fl64
Copy link
Member

@fl64 fl64 commented May 22, 2025

Description

Detect nodes with enabled /dev/kvm and CPU features VMX/SVM to schedule virt-handlers only on capable nodes.

Why do we need it, and what problem does it solve?

The virtualization module for creating VMs requires the presence of /dev/kvm and CPU features such as VMX (Intel) or SVM (AMD). However, in hybrid clusters, some nodes may lack these capabilities, causing virt-handler pods to fail during startup.

What is the expected result?

This change ensures that virt-handler pods are scheduled only onto nodes that have both the required device (/dev/kvm) and CPU features (VMX/SVM), preventing scheduling failures and improving stability in heterogeneous environments.

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes.
  • Changes were tested in the Kubernetes cluster manually.

Changelog entries

section: module
type: feature
summary: Add detection of virtualization-capable nodes (with /dev/kvm enabled and support for VMX/SVM processor instructions) to schedule virtual machine deployment only on suitable nodes.

@fl64 fl64 added this to the v0.19.0 milestone May 22, 2025
@fl64 fl64 force-pushed the add-workload-nodeselectors branch 6 times, most recently from b120987 to 8ddb674 Compare May 22, 2025 08:41
@fl64 fl64 requested a review from diafour May 22, 2025 08:59
@fl64 fl64 marked this pull request as ready for review May 22, 2025 09:00
@fl64 fl64 requested review from z9r5, goganat and Isteb4k as code owners May 22, 2025 09:00
z9r5
z9r5 previously approved these changes May 22, 2025
@Isteb4k Isteb4k marked this pull request as draft May 26, 2025 10:24
@fl64 fl64 force-pushed the add-workload-nodeselectors branch from 8ddb674 to 2e21918 Compare May 29, 2025 06:20
@fl64 fl64 changed the title feat(moduel): add nodeSelector for workload feat(moduel): add nodeSelector for virt-handler May 29, 2025
@Isteb4k Isteb4k modified the milestones: v0.19.0, v0.20.0 May 29, 2025
@fl64 fl64 changed the title feat(moduel): add nodeSelector for virt-handler feat(module): add nodeSelector for virt-handler May 29, 2025
@fl64 fl64 force-pushed the add-workload-nodeselectors branch 4 times, most recently from 4c7965a to 4c6ca06 Compare June 11, 2025 11:35
@fl64 fl64 changed the title feat(module): add nodeSelector for virt-handler feat(module): detect nodes with enabled /dev/kvm to schedule virt-handlers Jun 11, 2025
@fl64 fl64 force-pushed the add-workload-nodeselectors branch 3 times, most recently from eb277da to ba96910 Compare June 11, 2025 12:33
@fl64 fl64 force-pushed the add-workload-nodeselectors branch from a3bd209 to 1ff1e78 Compare June 13, 2025 13:59
fl64 added 5 commits June 14, 2025 17:06
Signed-off-by: Pavel Tishkov <[email protected]>
Signed-off-by: Pavel Tishkov <[email protected]>
Signed-off-by: Pavel Tishkov <[email protected]>
Signed-off-by: Pavel Tishkov <[email protected]>
Signed-off-by: Pavel Tishkov <[email protected]>
@fl64 fl64 force-pushed the add-workload-nodeselectors branch 5 times, most recently from d91908e to 31c0d3a Compare June 15, 2025 15:46
Signed-off-by: Pavel Tishkov <[email protected]>
@fl64 fl64 force-pushed the add-workload-nodeselectors branch from 31c0d3a to fa2fddd Compare June 15, 2025 15:49
@fl64 fl64 marked this pull request as ready for review June 15, 2025 15:56
Signed-off-by: Pavel Tishkov <[email protected]>
@fl64 fl64 requested review from diafour and yaroslavborbat June 16, 2025 07:22
@nevermarine nevermarine modified the milestones: v0.20.0, v0.21.0 Jun 17, 2025
Signed-off-by: Pavel Tishkov <[email protected]>
@fl64 fl64 requested a review from yaroslavborbat June 19, 2025 13:21
@fl64 fl64 merged commit 5f3b527 into main Jun 19, 2025
22 of 24 checks passed
@fl64 fl64 deleted the add-workload-nodeselectors branch June 19, 2025 15:50
This was referenced Jun 19, 2025
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.

6 participants