Skip to content

feat: log scriptless cmd mode for easier logging and debugging#8155

Merged
awesomenix merged 1 commit into
mainfrom
nishp/scriptless/logging
Mar 23, 2026
Merged

feat: log scriptless cmd mode for easier logging and debugging#8155
awesomenix merged 1 commit into
mainfrom
nishp/scriptless/logging

Conversation

@awesomenix

Copy link
Copy Markdown
Contributor

Log scriptless CSE Cmd mode for easier logging and debugging

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

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.txt and include a ScriptlessMode field in the CSE start event message payload.
  • Emit an AKS.CSE.scriptlessCmdMode event during basePrep when 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

Comment on lines +33 to +37
SCRIPTLESS_MODE=false

if [ -f "/opt/azure/containers/scriptless-cse-overrides.txt" ]; then
SCRIPTLESS_MODE=true
fi

Copilot AI Mar 23, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copilot uses AI. Check for mistakes.
fi

if [ -f "/opt/azure/containers/scriptless-cse-overrides.txt" ]; then
logs_to_events "AKS.CSE.scriptlessCmdMode" scriptlessCmdMode

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.

this seems a bit redundant if we're already adding a new key to cse_start's event JSON payload

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed, thank you

@awesomenix awesomenix merged commit d79cdc5 into main Mar 23, 2026
19 of 27 checks passed
@awesomenix awesomenix deleted the nishp/scriptless/logging branch March 23, 2026 23:14
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