feat: log scriptless cmd mode for easier logging and debugging#8155
Conversation
There was a problem hiding this comment.
Pull request overview
Adds additional logging signals to indicate when Linux node provisioning is running in “scriptless CSE cmd” mode, to simplify troubleshooting during bootstrap.
Changes:
- Detect presence of
/opt/azure/containers/scriptless-cse-overrides.txtand include aScriptlessModefield in the CSE start event message payload. - Emit an
AKS.CSE.scriptlessCmdModeevent duringbasePrepwhen scriptless mode is enabled. - Add a small
scriptlessCmdMode()helper that logs a human-readable message.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| parts/linux/cloud-init/artifacts/cse_start.sh | Adds scriptless-mode detection and includes it in the emitted GA event Message payload |
| parts/linux/cloud-init/artifacts/cse_main.sh | Logs a dedicated CSE event when scriptless mode is detected |
| parts/linux/cloud-init/artifacts/cse_config.sh | Adds scriptlessCmdMode() helper function invoked by cse_main.sh |
| SCRIPTLESS_MODE=false | ||
|
|
||
| if [ -f "/opt/azure/containers/scriptless-cse-overrides.txt" ]; then | ||
| SCRIPTLESS_MODE=true | ||
| fi |
There was a problem hiding this comment.
The log field name/value for this feature is inconsistent with the repo’s existing terminology (e.g., NodeBootstrappingConfiguration.EnableScriptlessCSECmd and the task name AKS.CSE.scriptlessCmdMode). To make log parsing/debugging less confusing, consider renaming SCRIPTLESS_MODE/ScriptlessMode to something that matches the feature name (e.g., SCRIPTLESS_CSE_CMD_MODE and ScriptlessCSECmdMode or EnableScriptlessCSECmd).
| fi | ||
|
|
||
| if [ -f "/opt/azure/containers/scriptless-cse-overrides.txt" ]; then | ||
| logs_to_events "AKS.CSE.scriptlessCmdMode" scriptlessCmdMode |
There was a problem hiding this comment.
this seems a bit redundant if we're already adding a new key to cse_start's event JSON payload
There was a problem hiding this comment.
changed, thank you
ca966c5 to
8b43923
Compare
Log scriptless CSE Cmd mode for easier logging and debugging