release 1.7.6: monpages obligatory ERROR with stack inventory

GOA monpages checks the full suite catalog (bank/exchange/taler
/monitoring/ plus surface/aptdeploy/mattermost/mail) and on-disk
discovery; FP only its own mon hosts. Default MONPAGES_REQUIRE_PUBLIC=1.
Also fix with_timeout re-running failed phases via || fallback.
This commit is contained in:
Hernâni Marques 2026-07-19 02:05:00 +02:00
parent bbb96a92ef
commit 812b7758f0
No known key found for this signature in database
11 changed files with 188 additions and 49 deletions

15
lib.sh
View file

@ -323,13 +323,24 @@ SSH_BASE_OPTS=(
# Hard wall-clock timeout so ssh/curl never block the monitoring run forever.
with_timeout() {
local secs="$1"; shift
local rc
if command -v gtimeout >/dev/null 2>&1; then
gtimeout --kill-after=2 "$secs" "$@"
return $?
fi
if command -v timeout >/dev/null 2>&1; then
timeout -k 2 "$secs" "$@" 2>/dev/null || timeout --kill-after=2 "$secs" "$@"
return $?
# Prefer GNU -k; if that flag form is unsupported, fall back once.
# Do NOT use `cmd || cmd` on the child — a phase exit 1 would re-run it.
set +e
timeout -k 2 "$secs" "$@" 2>/dev/null
rc=$?
set -e
# 125 = timeout(1) itself failed (bad options); 126/127 = not executable
if [ "$rc" -eq 125 ] || [ "$rc" -eq 126 ] || [ "$rc" -eq 127 ]; then
timeout --kill-after=2 "$secs" "$@"
return $?
fi
return "$rc"
fi
# Portable: perl alarm + process group kill
perl -e '