gates / gates (push) Successful in 2m4s
Traefik's memory on 9202: v3.7.16 18.7 -> 79.0 MiB after 920 connections, not released; v3.7.17 flat near 25 MiB for 25,116 connections. Golden 0.350.0 waits for its fresh-install proof and the operator's vouch. Not 0.349.0.
25 lines
2.1 KiB
Bash
Executable File
25 lines
2.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# walk_release.sh <ssh-host> <vmid> <domain> <since RFC3339> — the release box walk, read-only, from inside the guest:
|
|
# the controller's image and health; Traefik's image and digest; every container up and not unhealthy; the controller log since
|
|
# the switch (refusals, errors); the dashboard login page and the file manager through the box's own proxy (GET only);
|
|
# every app route the box serves, through Traefik with its own Host (the public name is asked apart, from outside).
|
|
H=$1; V=$2; D=$3; SINCE=$4
|
|
ssh -o BatchMode=yes -o ConnectTimeout=15 "$H" "pct exec $V -- bash -s" <<EOF
|
|
echo "controller: \$(docker ps --filter name=^/felhom-controller\$ --format '{{.Image}} {{.Status}}')"
|
|
echo "traefik: \$(docker inspect traefik --format '{{.Config.Image}} {{.Image}} {{.State.Status}}') version \$(docker exec traefik traefik version | head -1 | awk '{print \$2}')"
|
|
echo "traefik repo digest: \$(docker image inspect \$(docker inspect traefik --format '{{.Image}}') --format '{{join .RepoDigests " "}}')"
|
|
echo "containers: \$(docker ps -a --format '{{.Names}}|{{.Status}}' | wc -l) total"
|
|
bad=\$(docker ps -a --format '{{.Names}}|{{.Status}}' | grep -E 'unhealthy|Restarting|Exited|Dead|Created' || true)
|
|
echo "not running/unhealthy: \${bad:-none}"
|
|
echo "refusals since \$(echo $SINCE): \$(docker logs --since $SINCE felhom-controller 2>&1 | grep -ciE 'REFUSED a catalog definition|app_definition_refused|definition refused')"
|
|
echo "ERROR lines since: \$(docker logs --since $SINCE felhom-controller 2>&1 | grep -c '\[ERROR\]')"
|
|
docker logs --since $SINCE felhom-controller 2>&1 | grep '\[ERROR\]' | cut -c1-220 | tail -5
|
|
echo "login page: \$(curl -sk -o /dev/null -w '%{http_code}' -H 'Host: felhom.$D' https://127.0.0.1/login)"
|
|
echo "file manager: \$(curl -sk -o /dev/null -w '%{http_code}' -H 'Host: files.$D' https://127.0.0.1/)"
|
|
for c in \$(docker ps --format '{{.Names}}'); do
|
|
docker inspect \$c --format '{{json .Config.Labels}}' | grep -o 'Host(\`[^\`]*\`)' | sed 's/Host(\`//; s/\`)//' | sort -u | while read -r h; do
|
|
echo "route \$h [\$c]: \$(curl -sk -m 20 -o /dev/null -w '%{http_code}' -H "Host: \$h" https://127.0.0.1/)"
|
|
done
|
|
done
|
|
EOF
|