2866f6a318
gates / gates (push) Successful in 27s
- R-732: the first-start geodata import runs up to 9 concurrent 5000-row INSERTs; the database needs ~400 MB anon + ~170 MB touched shared_buffers (the image's FIXED 512MB, not host-RAM sizing). 512M fits only with swap (bench swap 0: 61-104 kills; 9202 swap 512 MiB: survived by swapping). Controls: swap alone, limit alone flip it; shared_buffers 128MB alone does not. Catalog 56c4888: v3.2.4 + 768M, proven with swap off on both venues. audits/immich-first-start-2026-09-30/A-cause.md. - R-730: scripts/iso/build-felhom-iso.sh refuses an uncommitted/untracked/unpushed tree (no bypass), records repo-commit from the gate and iso-v<version>; test iso/test/clean-tree.sh, red-proof run (status check removed -> 2 of 4 cases fail -> restored). - R-731 narrowed (gitea 28.0.0 GA; mariadb 13.0 a short-term Rolling line). R-676 note. - New rows R-733 (bench has no swap, boxes 512 MiB), R-734 (immich .immich markers -> files_may_change). - STATUS: the golden line corrected (no bake is due; 0.283.1 is the newest release). Register 364 -> 366. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
61 lines
2.0 KiB
Python
61 lines
2.0 KiB
Python
#!/usr/bin/env python3
|
|
"""Point guest 9202 at the drill catalog (and a 90 s health timeout), or restore the saved config.
|
|
|
|
`09` §6.5: `git.repo_url` alone is INERT (R-615) — the cache dir must go too. The saved copy is
|
|
`controller.yaml.pre-immich0930` (NOT the older `.pre-28`, which a restore must never pick up).
|
|
"""
|
|
import re, sys, io
|
|
sys.path.insert(0, '.')
|
|
import walk as w
|
|
|
|
VOL = "/var/lib/docker/volumes/felhom-controller-data/_data"
|
|
DRILL_REPO = "https://gitea.dooplex.hu/admin/app-catalog-drill.git"
|
|
|
|
|
|
def creds():
|
|
for l in io.open("/home/kisfenyo/.git-credentials").read().strip().split("\n"):
|
|
m = re.match(r'https://(admin):([^@]+)@gitea\.dooplex\.hu', l)
|
|
if m:
|
|
return m.group(1), m.group(2)
|
|
raise SystemExit("no admin credential")
|
|
|
|
|
|
def to_drill():
|
|
u, t = creds()
|
|
print(w.guest(f"""
|
|
set -e
|
|
test -f {VOL}/controller.yaml.pre-immich0930 || cp -p {VOL}/controller.yaml {VOL}/controller.yaml.pre-immich0930
|
|
python3 - <<'PY'
|
|
import re
|
|
p = "{VOL}/controller.yaml"
|
|
s = open(p).read()
|
|
s = re.sub(r'(^\\s+repo_url: ).*$', r'\\g<1>{DRILL_REPO}', s, count=1, flags=re.M)
|
|
s = re.sub(r'(^git:(?:\\n\\s+.*)*?\\n\\s+token: ).*$', r'\\g<1>"{t}"', s, count=1, flags=re.M)
|
|
s = re.sub(r'(^git:(?:\\n\\s+.*)*?\\n\\s+username: ).*$', r'\\g<1>"{u}"', s, count=1, flags=re.M)
|
|
if not re.search(r'^update:', s, re.M):
|
|
s += "update:\\n health_timeout: 90s\\n"
|
|
open(p, "w").write(s)
|
|
PY
|
|
rm -rf {VOL}/catalog-cache {VOL}/data/catalog-cache
|
|
docker restart felhom-controller >/dev/null
|
|
sleep 15
|
|
grep -A6 '^git:' {VOL}/controller.yaml | sed 's/token:.*/token: <redacted>/'
|
|
grep -A2 '^update:' {VOL}/controller.yaml
|
|
"""))
|
|
|
|
|
|
def restore():
|
|
print(w.guest(f"""
|
|
set -e
|
|
cp -p {VOL}/controller.yaml.pre-immich0930 {VOL}/controller.yaml
|
|
rm -rf {VOL}/catalog-cache {VOL}/data/catalog-cache
|
|
docker restart felhom-controller >/dev/null
|
|
sleep 15
|
|
grep -A6 '^git:' {VOL}/controller.yaml | sed 's/token:.*/token: <redacted>/'
|
|
grep -c '^update:' {VOL}/controller.yaml || true
|
|
"""))
|
|
|
|
|
|
if __name__ == "__main__":
|
|
to_drill() if sys.argv[1] == "drill" else restore()
|