feat(apps/service-manager): Add logging output for service uptime checks (#23252)

This commit is contained in:
Yehonal
2025-10-16 11:30:04 +02:00
committed by GitHub
parent de9ef86a20
commit 4c3eab650c
2 changed files with 6 additions and 1 deletions

View File

@@ -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

View File

@@ -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
}