Azure / Azure/azure-linux-extensions

CustomScriptExtension checkpoint seems to happen too early

Open
#627 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
333
Forks
278
Avg merge
2d 9h
Merged PRs (30d)
4

Description

This is in relation to [this issue](https://github.com/Azure/WALinuxAgent/issues/1293)

As part of the above issue, we observed that even though the customscriptextension never got to the point where our cmdline was run, it still seems to have checkpointed (so that it never ran again).
The crash happened during file download and the surprising thing for me was that after that, the custom script extension thought that it had already run things (when in reality it hadn’t, it had just started the DL but it never completed).

It seems to me that checkpointing prior to actually running the script is risky, as if something happens (VM reboot, etc?) during file download but before the custom script cmdline is actually run we’ll be left with a node which never actually got around to running the custom script cmdline.

Shouldn't we checkpoint after download (i.e. just prior to cmdline execution), or maybe even better – after the commandline exited with some exit code?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading linked issue #1293 and tracing the CustomScriptExtension download, checkpoint, and command-line execution flow. Determine when the checkpoint is recorded relative to download completion and command execution, then verify that a failure or reboot during download cannot prevent the command line from running again.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, python
Domain
cloud, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.