Skip to content

Enhance zone selection logic for Azure GPU provisioning#2247

Merged
seokho-son merged 1 commit intocloud-barista:mainfrom
seokho-son:main
Dec 17, 2025
Merged

Enhance zone selection logic for Azure GPU provisioning#2247
seokho-son merged 1 commit intocloud-barista:mainfrom
seokho-son:main

Conversation

@seokho-son
Copy link
Copy Markdown
Member

image

Tested with Azure GPU VM provisioning.
Related with cloud-barista/cb-spider#1624

Copilot AI review requested due to automatic review settings December 17, 2025 08:42
@github-actions github-actions bot added the asset label Dec 17, 2025
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

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>
@seokho-son
Copy link
Copy Markdown
Member Author

Codacy Static Code Analysis
is not useful this time.

/approve

@seokho-son seokho-son merged commit da48c95 into cloud-barista:main Dec 17, 2025
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants