fix: correct sku-cpu label for Harvest VMs using actual core count#8611
Open
goiri wants to merge 1 commit into
Open
fix: correct sku-cpu label for Harvest VMs using actual core count#8611goiri wants to merge 1 commit into
goiri wants to merge 1 commit into
Conversation
Harvest VMs expose more physical cores to the guest OS than the nominal vCPU count reported by the CRP SKU API (e.g., harvest_e8s_v3 reports 8 but the guest sees 16). This causes the kubernetes.azure.com/sku-cpu label to be incorrect, leading to scheduling mismatches. Linux: Add fixSkuCpuLabel() to cse_helpers.sh that compares the RP-provided sku-cpu label against nproc output and corrects it before kubelet starts. Windows: Add Fix-SkuCpuLabel to kubeletfunc.ps1 that compares against Win32_ComputerSystem.NumberOfLogicalProcessors and corrects the label in kubeletstart.ps1 before kubelet args are built. Both approaches are generic and work for any SKU where the CRP-reported vCPU count doesn't match the actual cores visible to the OS. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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
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.
Problem
Harvest VMs expose more physical cores than the nominal vCPU count reported by CRP SKU API (e.g., harvest_e8s_v3 reports 8 but guest sees 16). This causes
kubernetes.azure.com/sku-cputo be wrong, leading to scheduling mismatches.Fix
Before kubelet starts, compare the RP-provided sku-cpu label against the actual core count from the OS:
nprocincse_helpers.shWin32_ComputerSystem.NumberOfLogicalProcessorsinkubeletfunc.ps1If they differ, correct the label. Generic - works for any SKU with a mismatch, not just Harvest.
Testing