release 1.10.4: strict suite auto-upgrade; bootstrap monpages ERROR; stage timer units
This commit is contained in:
parent
bc0d0a5485
commit
761e3d3c11
8 changed files with 143 additions and 25 deletions
|
|
@ -220,7 +220,14 @@ build_urls() {
|
|||
fi
|
||||
}
|
||||
|
||||
# True if body looks like our monitoring HTML (not merchant API / WP 404).
|
||||
# Install stub only (no console log) — not a real mon page.
|
||||
is_bootstrap_html() {
|
||||
local f="$1"
|
||||
grep -qiE 'Monitoring page \(bootstrap\)|pill">STAGE</|install stub|bootstrap page' "$f" 2>/dev/null \
|
||||
&& ! grep -qE 'taler-mon:top|id="mon-console"|class="console"' "$f" 2>/dev/null
|
||||
}
|
||||
|
||||
# True if body looks like our monitoring HTML (not merchant API / WP 404 / bootstrap).
|
||||
is_monitoring_html() {
|
||||
local f="$1"
|
||||
if grep -qE '"code"[[:space:]]*:[[:space:]]*21' "$f" 2>/dev/null; then
|
||||
|
|
@ -233,6 +240,10 @@ is_monitoring_html() {
|
|||
&& grep -qiE '404|not found|page introuvable' "$f" 2>/dev/null; then
|
||||
return 1
|
||||
fi
|
||||
# Bootstrap sticky is not enough — need suite console output
|
||||
if is_bootstrap_html "$f"; then
|
||||
return 1
|
||||
fi
|
||||
if grep -qE 'sticky-bar|version-link|taler-monitoring|class="sticky|taler-mon:top' "$f" 2>/dev/null; then
|
||||
return 0
|
||||
fi
|
||||
|
|
@ -401,6 +412,12 @@ check_one() {
|
|||
rm -f "$body"
|
||||
return 0
|
||||
fi
|
||||
if is_bootstrap_html "$body"; then
|
||||
_mon_fail_or_soft "public mon page bootstrap stub" \
|
||||
"$url -> install bootstrap HTML still live (run host-agent; suite auto-update must replace stub)" || { rm -f "$body"; return 1; }
|
||||
rm -f "$body"
|
||||
return 0
|
||||
fi
|
||||
if ! is_monitoring_html "$body"; then
|
||||
hint=$(head -c 120 "$body" | tr '\n' ' ' | tr -cd '[:print:] ')
|
||||
_mon_fail_or_soft "public mon page not monitoring HTML" \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue