Enhance zone selection logic for Azure GPU provisioning#2247
Enhance zone selection logic for Azure GPU provisioning#2247seokho-son merged 1 commit intocloud-barista:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR enhances the zone selection logic for Azure GPU VM provisioning by introducing flexible zone assignment mechanisms. The changes address Azure's OverconstrainedZonalAllocationRequest error that occurs when GPU VMs are requested in zones where they're unavailable. The solution implements a configurable approach where CSPs can specify whether to use empty representative zones, allowing cloud providers to auto-select the best available zone for specialized resources.
Key changes:
- Introduced CSP-level configuration (
useEmptyRepresentativeZone) and region-level configuration (representativeZone) to control zone assignment behavior - Modified subnet creation logic to conditionally assign zones based on whether a connection has an explicitly assigned zone
- Updated Azure's cloudinfo.yaml configuration to enable flexible zone placement by default
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/core/model/config.go | Added UseEmptyRepresentativeZone field to CSPDetail and RepresentativeZone pointer field to RegionDetail for configurable zone selection behavior |
| src/core/common/utility.go | Implemented three-tier priority logic for representative zone selection: explicit region setting, CSP-level empty zone setting, or default to first available zone |
| src/core/resource/common.go | Modified CreateSharedResource to conditionally assign zones to subnets based on connection's AssignedZone value, enabling CSP auto-selection when zone is empty |
| scripts/misc/update-cloudinfo.py | Added CSP_REPRESENTATIVE_ZONE_SETTINGS dictionary and logic to apply useEmptyRepresentativeZone configuration for Azure during cloudinfo.yaml generation |
| assets/cloudinfo.yaml | Enabled useEmptyRepresentativeZone: true for Azure CSP to prevent zone-constrained allocation errors for GPU VMs |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Seokho Son <shsongist@gmail.com>
|
Codacy Static Code Analysis /approve |
Tested with Azure GPU VM provisioning.
Related with cloud-barista/cb-spider#1624