From 4c3eab650c33c21542f5b111bf19693254737ae2 Mon Sep 17 00:00:00 2001 From: Yehonal Date: Thu, 16 Oct 2025 11:30:04 +0200 Subject: [PATCH] feat(apps/service-manager): Add logging output for service uptime checks (#23252) --- apps/compiler/includes/functions.sh | 2 ++ apps/startup-scripts/src/service-manager.sh | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/compiler/includes/functions.sh b/apps/compiler/includes/functions.sh index 991178d8e..c955f2847 100644 --- a/apps/compiler/includes/functions.sh +++ b/apps/compiler/includes/functions.sh @@ -143,6 +143,7 @@ function comp_compile() { mkdir -p "$AC_BINPATH_FULL" echo "Creating $confDir..." mkdir -p "$confDir" + mkdir -p "$confDir/modules" echo "Cmake install..." $SUDO cmake --install . --config $CTYPE @@ -166,6 +167,7 @@ function comp_compile() { cp -v --no-clobber "$confDir/authserver.conf.dist" "$confDir/authserver.conf" [[ -f "$confDir/dbimport.conf.dist" ]] && \ cp -v --no-clobber "$confDir/dbimport.conf.dist" "$confDir/dbimport.conf" + for f in "$confDir/modules/"*.dist do [[ -e $f ]] || break # handle the case of no *.dist files diff --git a/apps/startup-scripts/src/service-manager.sh b/apps/startup-scripts/src/service-manager.sh index 5e0a31d34..4f597fbeb 100755 --- a/apps/startup-scripts/src/service-manager.sh +++ b/apps/startup-scripts/src/service-manager.sh @@ -131,7 +131,7 @@ function serialize_exec_definition() { done local args_json - args_json=$(printf '%s\0' "${rel_args[@]}" "__AC_SENTINEL__" | jq -R -s 'split("\u0000")[:-1]') + args_json=$(printf '%s\0' "${rel_args[@]}" | jq -R -s 'split("\u0000")[:-1]') jq -n --arg command "$rel_command" --argjson args "$args_json" '{command: $command, args: $args}' } @@ -2291,6 +2291,9 @@ function wait_service_uptime() { sleep 1 waited=$((waited + 1)) done + # show service logs for debugging + echo -e "${YELLOW}Service logs for '$service_name':${NC}" + service_logs "$service_name" true echo -e "${RED}Timeout: $service_name did not reach ${min_seconds}s uptime within ${timeout}s${NC}" >&2 return 1 }