fix(azure): set DiskControllerType in StorageProfile for RHEL AI VMs#823
fix(azure): set DiskControllerType in StorageProfile for RHEL AI VMs#823rishupk wants to merge 1 commit into
Conversation
|
Warning Review limit reached
More reviews will be available in 59 minutes and 57 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (7)
📝 WalkthroughWalkthroughThis PR adds disk controller type support to Azure VM allocation and creation. It introduces data model fields for storing disk controller types, Azure API functions for querying SKU and image capabilities, allocation logic to filter compute sizes by disk controller compatibility, and VM resource wiring to set the disk controller type on created instances. ChangesDisk Controller Type Support
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@pkg/provider/azure/data/images.go`:
- Around line 101-103: The code currently uses AZURE_SUBSCRIPTION_ID to build
the compute client (subscriptionId -> armcompute.NewClientFactory), but for
shared/gallery images you must extract the subscription from the image ARM
resource ID (the variable id) instead of the caller default; update the logic in
images.go to parse the subscription segment from the image ARM ID (id), assign
that to subscriptionId and pass it into
armcompute.NewClientFactory(idSubscription, cred, nil) so cross-subscription
gallery images create the correct client and do not silently disable
enrichment/filtering.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Enterprise
Run ID: 1d9bb72a-065d-44ba-a841-e2c4fa789abb
📒 Files selected for processing (7)
pkg/provider/azure/action/rhel-ai/rhelai.gopkg/provider/azure/data/compute-request.gopkg/provider/azure/data/imageref.gopkg/provider/azure/data/images.gopkg/provider/azure/data/util.gopkg/provider/azure/modules/allocation/allocation.gopkg/provider/azure/modules/virtual-machine/virtual-machine.go
35fba64 to
99c8a46
Compare
99c8a46 to
6cfecf5
Compare
- Add DiskControllerType field to ImageReference; rhelai sets it to "SCSI" as a fallback when the gallery API is unavailable - Wire ImageReference.DiskControllerType into StorageProfile in virtual-machine.go via diskControllerTypePtr helper - Add GetSharedImageDiskControllerTypes to read disk controller types from gallery image definition features (not the version) - Add FilterComputeSizesByDiskControllerType combining location and disk controller type filtering in a single SKU enumeration; replaces the previous two-pass approach in allocation.go - resolveImageRef enriches DiskControllerType from gallery API only when the image supports exactly one type (capability != requirement) - Filter both spot and non-spot compute sizes; return a clear error if no compatible sizes remain after filtering Co-Authored-By: Claude <Sonnet 4.6> <noreply@anthropic.com> Signed-off-by: Rishabh Kothari <rkothari@redhat.com>
6cfecf5 to
9da27f0
Compare
|
Superseded by #826 (combined PR per reviewer request). |
RHEL AI VMs on certain instance families (
Standard_L8aos_v4and others) fail at boot because Azure infers NVMe as the disk controller type, but the gallery images only work with SCSI. This setsDiskControllerType: "SCSI"inStorageProfilethrough a new field onImageReference. It also reads the disk controller types from the gallery image definition and filters compute sizes at allocation — spot and non-spot — so an incompatible size fails with a clear error before Azure ever sees the request.Co-Authored-By: Claude <Sonnet 4.6> noreply@anthropic.com
Signed-off-by: Rishabh Kothari rkothari@redhat.com