Skip to content

fix: report pre-provision CSE failures#9027

Open
r2k1 wants to merge 1 commit into
mainfrom
r2k1-fix-cse-completion-markers
Open

fix: report pre-provision CSE failures#9027
r2k1 wants to merge 1 commit into
mainfrom
r2k1-fix-cse-completion-markers

Conversation

@r2k1

@r2k1 r2k1 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

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.complete or provision.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

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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.sh to upload logs and exit immediately on non-zero provisioning exit codes, and only write base_prep.complete / provision.complete on success.
  • Refine an e2e VMSS scriptless validation guard to honor the suite-level DISABLE_SCRIPTLESS setting.
  • 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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants