cluster: enforce master/worker topology — remove duplicate primary stack from zampp2 #12
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
zampp2 was running a full duplicate primary stack (mam-api, web-ui, editor, db, redis, worker) alongside node-agent. This violated the intended topology where only zampp1 is the master orchestrator. Fixed in this session.
Work completed (2026-05-22)
Cluster architecture cleanup
Problem: zampp2 had both
docker-compose.yml(full primary stack) anddocker-compose.worker.yml(node-agent) running simultaneously, giving it a duplicate MAM web UI, its own isolated postgres/redis, and a second mam-api on port 47432.Fix:
docker compose -f docker-compose.yml down)restart: unless-stopped, survives reboots via Docker policy):5432) and redis (:6379) on zampp1's host so worker nodes can connect when running--profile workertranscoding jobs — commit00f3f29.env(not tracked — contains credentials) to pointDATABASE_URLandREDIS_URLat172.18.91.216(zampp1) instead of local container namesdocker-compose.cluster.ymlworkaround file that had been sitting untracked on zampp1 (its function is now indocker-compose.ymldirectly)pickIp() LAN false-positive fix
Problem:
pickIp()inroutes/cluster.jsused the regex/^172\.(1[6-9]|2\d|3[01])\./to detect Docker bridge IPs — flagging the entire RFC1918 172.16/12 block. The real LAN (172.18.91.x) falls inside this range, so any worker node that joined without an explicitNODE_IPwould have its address mangled.Fix: Narrowed to
/^172\.17\./— only the actual defaultdocker0bridge — commit37767f9. In practice this was masked byNODE_IP=172.18.91.217being set in zampp2's.env, but a new node onboarded without that override would have hit it.Commits
00f3f2937767f9Current state
Both repos at
mainHEAD (37767f9), no local-ahead commits on either machine.Related
deploy/onboard-node.shis the canonical path for adding future worker nodes; it uses--project-name wild-dragon-workerand writes.env.worker(zampp2 was onboarded manually before that script existed)