Files
felhom.eu/documentation/audits/evidence-chaos-night-2026-09-17/steady.sh
T
adminandClaude Opus 5 9fae6dfa98
gates / gates (push) Successful in 23s
CHAOS NIGHT phase 0: golden 0.245.0, a self-installing box, and R-546
The schedule was drawn from seed 20260917 and written into the findings document
BEFORE round 1, with its re-draw log.

Phase 0 measured:
- golden 0.245.0 baked, published (registry 200, not an exit code) and vouched;
  the box installed itself from the published ISO 1.28.0 and landed on it with
  no hand upgrade (controller 0.245.0, agent 0.131.0).
- ZERO operator presses: the waiting self-bind mail worked, and the acknowledged
  -delete path re-issued off-site AND PBS-DR credentials by itself
  (pbsdr_auto_reissue) - the F-14 half nobody had watched happen live.
- R-546 filed (P2): tonight's own guide sends the household to create the
  recovery code ~17 minutes before the box can do it. It self-heals; the bar
  urges them there the whole time. Measured on both sides, not inferred.
- R-543 proven through its whole lifecycle on a fresh box: bar present while
  paused, gone for good once escrowed.
- Known rows met and recorded, not re-filed: R-542, R-536's failure events.

Also recorded honestly: three harness errors of mine (a script that announced
"all twelve deploys ACCEPTED" without checking, a "login ok (csrf 0)" that
turned eleven of my own 401s into what looked like product refusals, and a
head -12 that hid a disk), and a near-miss where I almost filed a defect
against a drive gate that was working and logging at DEBUG.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
2026-09-16 22:56:08 +02:00

46 lines
2.2 KiB
Bash
Executable File

#!/bin/bash
# steady.sh — is the box back on its own? Run between every round.
#
# "Steady" is not a word here, it is a measurement: every app running, the hub says ONLINE, the data
# drive reads Aktiv, and no alarm is active. If the box did not get there BY ITSELF, the round's
# steady-state cell is `—`, never a guess and never a number I helped it reach.
#
# Usage: steady.sh <round-label> (reads the box address from $BOXIP, guest id from $GUEST)
set -u
R="${1:?round label}"
VM=336
E=/mnt/5_hdd/felhom.eu/git/felhom.eu/documentation/audits/evidence-chaos-night-2026-09-17
OUT="$E/round-${R}-steady.txt"
H(){ ssh hp "$@" 2>/dev/null | grep -vE "locale|LC_|LANG|perl:|supported and installed|are supported"; }
say(){ echo "$(date -u +%FT%TZ) $*" | tee -a "$OUT"; }
say "=== steady check, round $R ==="
say "--- the box itself (is the VM even up?) ---"
H "qm status $VM" | tee -a "$OUT"
say "--- the customer guest and its apps (asked of the box, not of me) ---"
H "qm guest exec $VM -- bash -c 'pct list; echo ---; pct exec 9000 -- docker ps --format \"{{.Names}} {{.Status}}\"'" 2>/dev/null | tee -a "$OUT"
say "--- the hub's view: host row, guests, agent, last report ---"
cd /mnt/5_hdd/felhom.eu/git/felhom.eu
python3 scripts/read_credential.py HUB_PW /tmp/.shp >/dev/null 2>&1
HUB_PW=$(cat /tmp/.shp); IP=$(sudo kubectl -n felhom-system get svc hub -o jsonpath='{.spec.clusterIP}')
curl -s -u ":$HUB_PW" "http://$IP:8080/hosts" | python3 -c "
import sys,re,html
t=sys.stdin.read()
txt=html.unescape(re.sub(r'\s+',' ',re.sub(r'<[^>]+>',' ',re.sub(r'<script.*?</script>','',t,flags=re.S))))
i=txt.find('chaosnight')
print(' ', txt[max(0,i-40):i+220] if i>=0 else 'chaosnight NOT in the hosts table')
" | tee -a "$OUT"
say "--- alarms/events in the last 30 minutes (fired AND suppressed are different things) ---"
curl -s -u ":$HUB_PW" "http://$IP:8080/" | python3 -c "
import sys,re,html
t=sys.stdin.read()
txt=html.unescape(re.sub(r'\s+',' ',re.sub(r'<[^>]+>',' ',re.sub(r'<script.*?</script>','',t,flags=re.S))))
m=re.search(r'(Recent events|Events|Legutobbi).{0,900}', txt)
print(' ', (m.group(0)[:900] if m else txt[:400]))
" | tee -a "$OUT"
rm -f /tmp/.shp
say "=== end steady check, round $R ==="