[AI Generated] BugFix: Use platform capability disk_count instead of vCPU/8 formula for NVMe count validation#4440
Open
knelsonmeister wants to merge 1 commit intomainfrom
Conversation
…vCPU/8 formula for NVMe count validation
✅ AI Test Selection — PASSED7 test case(s) selected (view run) Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest
Test case details
|
Collaborator
Author
@microsoft-github-policy-service agree company="Microsoft" |
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.
Summary
The
verify_nvme_basictest (step 4 of_verify_nvme_disk) unconditionally asserted that the NVMe namespace count equalsceil(vCPU / 8). This formula only applies to storage-optimized (L-series) VMs with NVMe Direct disks, but was applied to all Azure VMs — causing false failures on VMs like Standard_D4ds_v6 / Standard_D64ds_v6 where NVMe is used for remote/temp disks with different counts.The fix replaces the hardcoded vCPU/8 formula with the platform-derived
NvmeSettings.disk_countcapability, which Azure computes fromNvmeDiskSizeInMiB / NvmeSizePerDiskInMiBin the SKU data. This is correct for all VM types.Validation Results