Repository navigation
MPI cohort AZ capacity fallback (Stage 1) - #371
Merged
Merged
Conversation
On InsufficientInstanceCapacity in the primary AZ, the MPI cohort now advances its shared placement rung to the next region AZ as a unit — all nodes land in one surviving AZ, preserving the placement-group/one-AZ invariant. cohort's launchCollective already owns the shared-rung advance; this supplies the chain. - pkg/aws/zones.go: DescribeAvailabilityZones (available + standard AZs only). - cmd/launch_jobarray.go: buildAZChain (operator AZ first, capped at 4) + orderAZs; set RungPlacement.Chain on every member intent. Gated to the PG-absent case for now (a pre-created PG binds to one AZ; lazy per-AZ PG is a later stage) — degrades to single-rung on AZ-discovery failure. - Tests: TestOrderAZs (cmd); TestMPI_MultiAZChain_LandsAllInSurvivingAZ extends the adapter fake with multi-AZ exhaustion (failAZs) and proves a 3-AZ chain lands all members in the one surviving AZ. Stage 1 of the cohort MPI integration (plan: majestic-enchanting-kernighan).
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This was referenced Jul 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stage 1 of the cohort MPI integration. Adds automatic Availability-Zone capacity fallback to MPI/job-array cohort launches — the headline capability the legacy loop lacks.
What
When the primary AZ returns
InsufficientInstanceCapacity, the whole cohort advances to the next region AZ as a unit (all nodes in one surviving AZ, preserving the placement-group/one-AZ invariant). cohort'slaunchCollectivealready owns the shared-rung advance; this PR supplies theRungPlacement.Chainit walks.pkg/aws/zones.go— newDescribeAvailabilityZones(available + standard AZs only; excludes Local/Wavelength zones).cmd/launch_jobarray.go—buildAZChain(operator-selected AZ first, capped atmaxAZFallbackRungs=4) +orderAZs; setsRungPlacement{Rung, Chain}on every member intent.Scope guard
This stage enables the chain only when no cluster placement group is set. A pre-created PG binds to one AZ, so moving AZ mid-fallback would break it — resolved in Stage 3 (lazy per-AZ PG). With a PG set, or if AZ discovery fails, it degrades to single-rung (prior behavior). So no behavior change for today's PG-backed MPI launches; plain multi-AZ-eligible launches gain fallback.
Tests
TestOrderAZs— AZ ordering (preferred-first, absent, empty).TestMPI_MultiAZChain_LandsAllInSurvivingAZ— extends the adapter fake with multi-AZ exhaustion (failAZs) and proves a 3-AZ chain with the first two exhausted lands all members in the third AZ.go build ./...,pkg/aws+pkg/mpicohort+cmdtests green; gofmt clean.Depends on Stage 0 (#370, merged). Part of the cohort MPI integration.