-
Notifications
You must be signed in to change notification settings - Fork 250
feat: skip cloud-init ready report and add standalone report_ready script #8056
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
5d3d2c2
ed3d302
bc4ce91
e1d2a33
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
…ript Bake experimental_skip_ready_report into VHD via cloud.cfg.d to skip cloud-init's built-in health ready report to Azure fabric. Add a standalone Python script (report_ready.py) that can be invoked from CSE to report ready at the appropriate time during node provisioning. Depends on canonical/cloud-init#6771. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -97,6 +97,15 @@ EVENT_JSON=$( jq -n \ | |
| ) | ||
| echo ${EVENT_JSON} > ${EVENTS_LOGGING_DIR}${EVENTS_FILE_NAME}.json | ||
|
|
||
|
|
||
| if [ -x /opt/azure/containers/report_ready.py ]; then | ||
| if [ "$EXIT_CODE" -eq 0 ]; then | ||
| python3 /opt/azure/containers/report_ready.py -v || echo "WARNING: Failed to report ready to Azure fabric" | ||
| else | ||
| python3 /opt/azure/containers/report_ready.py -v --failure --description "ExitCode: ${EXIT_CODE}, ${message_string}" || echo "WARNING: Failed to report failure to Azure fabric" | ||
| fi | ||
|
Comment on lines
+101
to
+106
|
||
| fi | ||
|
|
||
| # force a log upload to the host after the provisioning script finishes | ||
| # if we failed, wait for the upload to complete so that we don't remove | ||
| # the VM before it finishes. if we succeeded, upload in the background | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This
report_ready.pyinvocation runs synchronously before log upload/exit, and can block provisioning for up to ~100s on wireserver timeouts/retries (GET/POST timeouts are 30s with multiple retries). If this is intended to be best-effort (as suggested by|| echo "WARNING"), consider running it in the background on success and/or moving it afterupload_logs(especially on failure) or passing tighter retry/timeout settings to avoid delaying provisioning and log upload.