Skip to content

[AI Generated] BugFix: auto-bump osdisk_size_in_gb when ARM rejects too-small OS disk#4475

Merged
LiliDeng merged 1 commit into
mainfrom
bugfix/osdisk-size-autobump_120526_100044
May 14, 2026
Merged

[AI Generated] BugFix: auto-bump osdisk_size_in_gb when ARM rejects too-small OS disk#4475
LiliDeng merged 1 commit into
mainfrom
bugfix/osdisk-size-autobump_120526_100044

Conversation

@LiliDeng
Copy link
Copy Markdown
Collaborator

@LiliDeng LiliDeng commented May 12, 2026

When an Azure marketplace image's OS disk is larger than the requested osdisk_size_in_gb, ARM fails the deployment with OperationNotAllowed. Some images don't expose their disk size via the virtual_machine_images API, so the pre-deploy bump in _create_node_arm_parameters is skipped.

This change parses the ARM error, bumps osdisk_size_in_gb to the size reported by ARM, and retries the deployment once. The discovered size is cached against the marketplace identifier so subsequent environments using the same image deploy correctly on the first try.

Description

Related Issue

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring
  • Documentation update

Checklist

  • Description is filled in above
  • No credentials, secrets, or internal details are included
  • Peer review requested (if not, add required peer reviewers after raising PR)
  • Tests executed and results posted below

Test Validation

Key Test Cases:

Impacted LISA Features:

Tested Azure Marketplace Images:

Test Results

Image VM Size Result
PASSED / FAILED / SKIPPED

…oo-small OS disk

When an Azure marketplace image's OS disk is larger than the requested osdisk_size_in_gb, ARM fails the deployment with OperationNotAllowed. Some images don't expose their disk size via the virtual_machine_images API, so the pre-deploy bump in _create_node_arm_parameters is skipped.

This change parses the ARM error, bumps osdisk_size_in_gb to the size reported by ARM, and retries the deployment once. The discovered size is cached against the marketplace identifier so subsequent environments using the same image deploy correctly on the first try.
@LiliDeng LiliDeng requested a review from johnsongeorge-w as a code owner May 12, 2026 03:54
Copilot AI review requested due to automatic review settings May 12, 2026 03:54
@github-actions
Copy link
Copy Markdown

✅ AI Test Selection — PASSED

1 test case(s) selected (view run)

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

Count
✅ Passed 1
❌ Failed 0
⏭️ Skipped 0
Total 1
Test case details
Test Case Status Time (s) Message
smoke_test (lisa_0_0) ✅ PASSED 46.481

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a resilience mechanism to Azure ARM deployments when the requested osdisk_size_in_gb is smaller than the marketplace image’s actual OS disk size and Azure fails the deployment with an OperationNotAllowed-style message. The change retries the deployment once with the corrected OS disk size parsed from the ARM error, and caches the discovered size per marketplace image so subsequent deployments avoid the initial failure.

Changes:

  • Add an ARM error regex to detect “OS disk size too small” failures and extract the required size.
  • On matching failure, bump osdisk_size_in_gb in the ARM deployment parameters and retry deployment once.
  • Cache discovered OS disk sizes keyed by marketplace identifier and apply the cached size during later ARM parameter generation.

Comment thread lisa/sut_orchestrator/azure/platform_.py
@LiliDeng LiliDeng merged commit 608ceb3 into main May 14, 2026
65 checks passed
@LiliDeng LiliDeng deleted the bugfix/osdisk-size-autobump_120526_100044 branch May 14, 2026 02:14
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.

3 participants