Skip to content

fix(vm): respect node placement when picking TSC frequency#2630

Merged
eofff merged 6 commits into
mainfrom
fix/vm/tsc-selector
Jul 14, 2026
Merged

fix(vm): respect node placement when picking TSC frequency#2630
eofff merged 6 commits into
mainfrom
fix/vm/tsc-selector

Conversation

@eofff

@eofff eofff commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Description

Bumps 3p-kubevirt to v1.6.2-v12n.60. The only change here is the fork tag in build/components/versions.yml; the actual fix lives in the fork.

The fork now picks the invariant TSC frequency for a VMI only among the nodes that VMI can actually be scheduled on (the pod's nodeSelectors + required node affinity), instead of the cluster-wide minimum.

Fork PR: deckhouse/3p-kubevirt#150

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

VMs that require a pinned TSC frequency — Windows guests (Hyper-V Reenlightenment, enabled automatically for osType: Windows) or invtsc: require — could hang in Pending forever.

The frequency was chosen as the minimum across all schedulable nodes. If that minimum belonged to a node the VM cannot land on (excluded by VMClass CPU-feature selectors, nodeSelector or affinity), and the candidate nodes are non-scalable with that frequency outside the ±250 ppm tolerance, the pod's tsc-frequency-<F> selector never intersects with the rest of its selectors. The pod stays Pending, and since hints are written to the VMI once, it never recovers on its own. Breaks on heterogeneous clusters with per-VM placement constraints.

What is the expected result?

A Windows VM on a VMClass restricted to a subset of nodes gets a TSC frequency native to one of its candidate nodes and schedules normally. Reproduction steps and the behavior matrix are in the fork PR.

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: vm
type: fix
summary: VMs requiring a pinned TSC frequency (Windows/Hyper-V, invtsc) no longer hang in Pending on heterogeneous clusters — the frequency is now picked among the nodes the VM can actually be scheduled on.

@eofff eofff force-pushed the fix/vm/tsc-selector branch 2 times, most recently from 2d0f2a3 to ad96a8f Compare July 10, 2026 13:34
@eofff eofff self-assigned this Jul 13, 2026
Valeriy Khorunzhin added 6 commits July 14, 2026 14:21
t
Signed-off-by: Valeriy Khorunzhin <valeriy.khorunzhin@flant.com>
1
Signed-off-by: Valeriy Khorunzhin <valeriy.khorunzhin@flant.com>
t
Signed-off-by: Valeriy Khorunzhin <valeriy.khorunzhin@flant.com>
ttt
Signed-off-by: Valeriy Khorunzhin <valeriy.khorunzhin@flant.com>
t
Signed-off-by: Valeriy Khorunzhin <valeriy.khorunzhin@flant.com>
Signed-off-by: Valeriy Khorunzhin <valeriy.khorunzhin@flant.com>
@eofff eofff force-pushed the fix/vm/tsc-selector branch from 5d0b866 to 244ca42 Compare July 14, 2026 11:23
@eofff eofff changed the title t fix(vm): respect node placement when picking TSC frequency Jul 14, 2026
@eofff eofff marked this pull request as ready for review July 14, 2026 11:25
@eofff eofff requested a review from Isteb4k as a code owner July 14, 2026 11:25
@eofff eofff requested a review from diafour July 14, 2026 11:25
@eofff eofff added this to the v1.10.0 milestone Jul 14, 2026
@eofff eofff merged commit b1b9de2 into main Jul 14, 2026
33 of 39 checks passed
@eofff eofff deleted the fix/vm/tsc-selector branch July 14, 2026 11:28
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