From 564b8e68506bdb395f4c622d9da11742d07ab62c Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Thu, 12 Feb 2026 11:24:19 +0100 Subject: [PATCH] Report install start/failure to telemetry API Add telemetry hooks in misc/build.func: call post_to_api at installation start to capture early or immediately-failing installs, and call post_update_to_api with status "failed" and the install exit code when a container installation fails. This improves visibility into install failures for monitoring/telemetry. --- misc/build.func | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/misc/build.func b/misc/build.func index 276434141..e32d96235 100644 --- a/misc/build.func +++ b/misc/build.func @@ -3636,6 +3636,9 @@ $PCT_OPTIONS_STRING" exit 214 fi msg_ok "Storage space validated" + + # Report installation start to API (early - captures failed installs too) + post_to_api fi create_lxc_container || exit $? @@ -4043,6 +4046,9 @@ EOF' if [[ $install_exit_code -ne 0 ]]; then msg_error "Installation failed in container ${CTID} (exit code: ${install_exit_code})" + # Report failure to telemetry API + post_update_to_api "failed" "$install_exit_code" + # Copy both logs from container before potential deletion local build_log_copied=false local install_log_copied=false