fix(azure): emit the bake marker before deprovision, and never wait on it - #243
Merged
Conversation
…n it A bake that installed everything correctly still hung for 90 minutes and captured nothing. The guest script ran `waagent -deprovision+user -force` and then echoed its completion marker, but deprovisioning stops the guest agent, and the guest agent is what carries a run command's output back to the caller. The marker could never be delivered, so the invoking CLI blocked until Azure's extension timeout no matter how well the bake went. This could never have worked. It stayed hidden because an earlier bug killed the guest script on its first line, and a script that dies instantly never reaches deprovision. Fixing that one exposed this one. The guest script now ends at its marker and does not deprovision at all. The host deprovisions afterwards as its own fire-and-forget call, since a call that stops the agent can never report its own completion, and Azure still requires it before generalize. Verification: tests/fm-azure-cell-image.test.sh exits 0, with a case that reads the GENERATED guest script and fails if deprovision appears in it, and that requires the host's deprovision to be --no-wait and to precede generalize. Two mutations, each red: deprovision put back in the guest script, and the host waiting on the deprovision call. The image this bake was meant to produce has since been captured from the built builder and verified to carry pi 0.84.1, node, and the pinned closures.
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.
A bake that installed everything correctly still hung for 90 minutes and captured nothing.
The guest script ran
waagent -deprovision+user -forceand then echoed its completion marker. Deprovisioning stops the guest agent, and the guest agent is what carries a run command output back to the caller. The marker could never be delivered, so the invoking CLI blocked until Azure extension timeout no matter how well the bake went.This could never have worked. It stayed hidden because an earlier bug killed the guest script on its first line, and a script that dies instantly never reaches deprovision. Fixing that one exposed this one.
Fix
The guest script ends at its marker and does not deprovision at all. The host deprovisions afterwards as its own fire-and-forget call, since a call that stops the agent can never report its own completion, and Azure still requires it before generalize.
Verification
tests/fm-azure-cell-image.test.shexits 0. The new case reads the generated guest script and fails if deprovision appears in it, and requires the host deprovision to be--no-waitand to precede generalize.Related
The image this bake was meant to produce has since been captured from the built builder and verified to carry pi 0.84.1, node, and the pinned closures.