Files
felhom.eu/documentation/audits/catalog-sweep-2026-10-24/tools/chain4.sh
T
admin 67053335d1
gates / gates (push) Successful in 13m17s
Catalog sweep 2026-10-24: all 65 catalog apps on a fresh box (52 work, 10 with a problem, 0 broken); register 208 -> 217 (R-1269..R-1277 opened; notes on R-739, R-1267); STATUS + D46; map B1 re-checked; evidence
Every catalog app installed, used, backed up, removed keeping data, reinstalled, restored and removed with data on a
fresh box from the public ISO (demo-hp VM 9360, Tester4), endpoint-level. Worst: a reinstall's capture rewrites the
kept unit so its restore breaks the app (R-1269, P2), the restore still reports success (R-1270, P2), and „use my kept
data" loaded another box's future-dated database (R-1271, P2). Drill catalog fixes for the morning list (n8n usage
data; OpenGist 256M, proven by a cgroup probe). VM 9360 and LXC 9361 destroyed; hub host Tester4-aa9466 left for the
operator. REPORT-catalog-sweep-2026-10-24.md.
2026-10-25 00:13:05 +02:00

36 lines
2.6 KiB
Bash

#!/bin/bash
# chain4.sh — the drill pass again, through the box's local mirror (chain3's drill pass ran on the live templates:
# the box's clone of the private drill repo failed, see repoint.py). n8n, opengist, vaultwarden: chain3's runs are kept
# as run-live-2 (they are live-catalog runs). Stops before any install if the drill is not CONFIRMED on the box.
E=/mnt/5_hdd/felhom.eu/git/felhom.eu/documentation/audits/catalog-sweep-2026-10-24
export SC=/run/user/1000/sweep-sc TARGET=sweep BASE=https://192.168.0.157 DRIVE_ROOT=/mnt/felhom-drives/hdd_1 SWEEP_EV=$E
cd $E/tools
G() { ssh -n -o BatchMode=yes root@192.168.0.138 "pct exec 9201 -- bash -c \"$1\""; }
keep_first() { a=$1; if [ -d "$E/$a" ] && [ ! -d "$E/$a/run-$2" ]; then mkdir -p "$E/$a/run-$2"; find "$E/$a" -maxdepth 1 -mindepth 1 ! -name 'first-run' ! -name 'run-*' -exec mv {} "$E/$a/run-$2/" \; ; fi; }
relogin() { sec run SWEEP_2026_10_24_DASH_PW -- bash brun.sh --env SWEEP_2026_10_24_DASH_PW:PW --push steps-login.json -- /opt/pw/bin/python /root/work/ui.py /root/work/steps-login.json > /dev/null 2>&1; }
wait_ctl() { for i in $(seq 1 60); do s=$(G "docker inspect -f {{.State.Health.Status}} felhom-controller" 2>/dev/null); [ "$s" = healthy ] && return 0; sleep 5; done; return 1; }
echo "$(date -u +%T) REPOINT drill (mirror)" >> $E/progress.log
if ! python3 repoint.py drill >> $E/_drill-repoint.txt 2>&1 < /dev/null; then
echo "$(date -u +%T) WARN drill NOT confirmed — no install; back to live" >> $E/progress.log
python3 repoint.py live >> $E/_drill-repoint.txt 2>&1 < /dev/null
wait_ctl; sleep 20; relogin
echo "$(date -u +%T) REPOINT live; CHAIN4 DONE (aborted)" >> $E/progress.log
exit 1
fi
wait_ctl; sleep 20; relogin
# the positive observable for a601950: the RUNNING n8n container carries the variable (only that line is read)
( for i in $(seq 1 120); do
v=$(G "docker inspect --format '{{range .Config.Env}}{{println .}}{{end}}' n8n 2>/dev/null | grep -E '^N8N_DIAGNOSTICS_ENABLED='")
if [ -n "$v" ]; then echo "$(date -u +%T) n8n container env: $v" >> $E/_drill-repoint.txt; break; fi
sleep 10
done ) &
for a in n8n opengist vaultwarden; do
keep_first $a live-2
echo "$(date -u +%T) START drill2 $a" >> $E/progress.log
if [ $a = vaultwarden ]; then FELHOM_BOX_ADMIN_SEED=1 timeout 2700 python3 sweep.py $a > $E/$a.console.txt 2>&1 < /dev/null; else timeout 2700 python3 sweep.py $a > $E/$a.console.txt 2>&1 < /dev/null; fi
echo "$(date -u +%T) END drill2 $a rc=$?" >> $E/progress.log
done
python3 repoint.py live >> $E/_drill-repoint.txt 2>&1 < /dev/null
wait_ctl; sleep 20; relogin
echo "$(date -u +%T) REPOINT live; CHAIN4 DONE" >> $E/progress.log