fix: report pre-provision CSE failures#9027
Open
r2k1 wants to merge 1 commit into
Open
Conversation
Only write CSE completion markers after provisioning succeeds, so failed PIS bake stages retain their exit status. Add a live failure-path E2E and allow explicit non-scriptless E2E runs to carry branch scripts. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 44f8813b-a71e-45a6-b822-f4452b755516
r2k1
requested review from
AbelHu,
Devinwong,
SriHarsha001,
awesomenix,
calvin197,
cameronmeissner,
djsly,
ganeshkumarashok,
karenychen,
lilypan26,
mxj220,
pdamianov-dev,
phealy,
runzhen,
sulixu,
timmy-wright,
titilambert,
xuexu6666 and
zachary-bailey
as code owners
July 23, 2026 21:47
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a Linux provisioning correctness issue where two-stage completion markers could be written even when provisioning failed (especially in pre-provision/PIS bake). By moving marker creation behind the provisioning exit-code check, failures now propagate correctly and won’t incorrectly signal basePrep/provision completion.
Changes:
- Update
cse_start.shto upload logs and exit immediately on non-zero provisioning exit codes, and only writebase_prep.complete/provision.completeon success. - Refine an e2e VMSS scriptless validation guard to honor the suite-level
DISABLE_SCRIPTLESSsetting. - Add an e2e scenario that forces a deterministic base-prep failure (CA trust update path) and asserts the correct failure is surfaced.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| parts/linux/cloud-init/artifacts/cse_start.sh | Prevents false-success marker creation by gating markers behind the provisioning exit-code check and exiting early on failures after log upload. |
| e2e/vmss.go | Skips the scriptless customData “no script content” assertion when scriptless is globally disabled. |
| e2e/scenario_test.go | Adds an e2e test that injects a basePrep failure and asserts the CSE failure is reported (exit status 161). |
timmy-wright
approved these changes
Jul 23, 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:
Moves Linux CSE completion markers behind the provisioning exit-code check. Failed pre-provision/PIS bake stages now upload logs, return their original exit code, and do not create
base_prep.completeorprovision.complete.Adds an E2E that injects a deterministic base-prep failure. The test reproduced the old false-success behavior and passes with branch CSE artifacts after the fix.
Which issue(s) this PR fixes:
N/A