Skip to content

[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
bugfix/nvme-basic-skip-vcpu8-non-direct_210426_213605
Open

[AI Generated] BugFix: Use platform capability disk_count instead of vCPU/8 formula for NVMe count validation#4440
knelsonmeister wants to merge 1 commit intomainfrom
bugfix/nvme-basic-skip-vcpu8-non-direct_210426_213605

Conversation

@knelsonmeister
Copy link
Copy Markdown
Collaborator

Summary

The verify_nvme_basic test (step 4 of _verify_nvme_disk) unconditionally asserted that the NVMe namespace count equals ceil(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_count capability, which Azure computes from NvmeDiskSizeInMiB / NvmeSizePerDiskInMiB in the SKU data. This is correct for all VM types.

Validation Results

VM Size Image Result
Standard_L8s_v3 Canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest PASSED
Standard_L80s_v3 Canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest PASSED
Standard_D4ds_v6 Canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest PASSED
Standard_D64ds_v6 Canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest PASSED
Standard_D2s_v3 Canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest SKIPPED (no NVMe — correct)

@github-actions
Copy link
Copy Markdown

✅ AI Test Selection — PASSED

7 test case(s) selected (view run)

Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest

Count
✅ Passed 7
❌ Failed 0
⏭️ Skipped 0
Total 7
Test case details
Test Case Status Time (s) Message
verify_nvme_manage_ns (lisa_0_4) ✅ PASSED 16.622
verify_nvme_sriov_rescind (lisa_0_6) ✅ PASSED 11.593
verify_nvme_function_unpartitioned (lisa_0_3) ✅ PASSED 28.129
verify_nvme_function (lisa_0_2) ✅ PASSED 27.749
verify_nvme_basic (lisa_0_0) ✅ PASSED 11.258
verify_nvme_rescind (lisa_0_5) ✅ PASSED 10.316
verify_nvme_max_disk (lisa_0_1) ✅ PASSED 7.933

@knelsonmeister
Copy link
Copy Markdown
Collaborator Author

@knelsonmeister please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"

Contributor License Agreement

@microsoft-github-policy-service agree company="Microsoft"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants