fix(e2e): retry VMSS creation on GalleryImageNotFound error#8239
Merged
ganeshkumarashok merged 2 commits intomainfrom Apr 3, 2026
Merged
fix(e2e): retry VMSS creation on GalleryImageNotFound error#8239ganeshkumarashok merged 2 commits intomainfrom
GalleryImageNotFound error#8239ganeshkumarashok merged 2 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the reliability of E2E VMSS provisioning by expanding the set of transient Azure API errors that trigger retries during VMSS creation, addressing eventual-consistency delays after SIG image replication to non-default regions.
Changes:
- Refactors the
retryOnpredicate inCreateVMSSWithRetryto early-return on non-Azure-API errors. - Adds
GalleryImageNotFoundas a retryable Azure API error code alongsideAllocationFailed.
- Add `GalleryImageNotFound` as a retryable error in `CreateVMSSWithRetry` to handle Azure eventual consistency after image replication completes - Refactor `retryOn` closure for clarity with early return on non-API errors Signed-off-by: Suraj Deshmukh <suraj.deshmukh@microsoft.com>
…ry check Narrow the retry predicate to also verify HTTP 404 status code, preventing retries on unexpected status codes for the same error code. Signed-off-by: Suraj Deshmukh <suraj.deshmukh@microsoft.com>
74d63b7 to
0c1ed59
Compare
ganeshkumarashok
approved these changes
Apr 3, 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.
What this PR does / why we need it:
Adds
GalleryImageNotFoundas a retryable error inCreateVMSSWithRetry(e2e/vmss.go).After VHD image replication to a non-default region completes (e.g.,
uaenorthfor H100 GPU tests), Azure's gallery API reports success, but the compute fabric in the target region may not have fully propagated the image yet. This causes VMSS creation to fail with a transientGalleryImageNotFounderror.Previously, the
retryOnclosure inCreateVMSSWithRetryonly retried onAllocationFailederrors. This change expands it to also retry onGalleryImageNotFound, allowing the existing retry loop (10 attempts, 5s delay) to handle the eventual consistency gap. The closure is also refactored with an early return for non-API errors for better readability.This was observed in PR #8227's GPU E2E pipeline, where
Test_Ubuntu2404_GPU_H100andTest_Ubuntu2404_NvidiaDevicePluginRunning_MIG_H100_NoRebootfailed after an 8-minute replication touaenorthcompleted successfully but the subsequent VMSS PUT returned 404.