Unify CDP relay ports: pin registry ports in netvm-names.sh

netvm-node-up.sh was starting the CDP relay with the hash-derived
CDP_PORT while cdp-relay-watchdog.sh pinned muse->9410, pip->9420,
646->9430, opm->9440. Since netvm-chrome.sh calls netvm-node-up.sh
on every browser relaunch, each restart spawned a wrong-port zombie
relay (9353, 10355, 10239...).

The pinning now lives in netvm_names() itself, making it the single
source of truth for all consumers (node-up, chrome, cdp, accounts,
watchdog). CDP_PORT_OVERRIDE still takes precedence for future nodes.

Session: sidechat/chromebox-ops
This commit is contained in:
operator-main
2026-10-04 18:21:47 +00:00
parent 7b5271a69a
commit 8d5d5c0f3b
+10
View File
@@ -13,5 +13,15 @@ netvm_names() {
# (9410, 9420, ...) instead of the hash-derived default. # (9410, 9420, ...) instead of the hash-derived default.
# Unset = previous behavior. # Unset = previous behavior.
CDP_PORT=${CDP_PORT_OVERRIDE:-$(( 9222 + 0x${_tag:4:3} % 2000 ))} CDP_PORT=${CDP_PORT_OVERRIDE:-$(( 9222 + 0x${_tag:4:3} % 2000 ))}
# Pinned registry ports: single source of truth for the fleet.
# (Was previously duplicated in cdp-relay-watchdog.sh relay_target();
# moved here 2026-10-04 so netvm-node-up.sh stops spawning wrong-port
# zombie relays on every browser relaunch.)
case "$NODE" in
muse) CDP_PORT=9410 ;;
pip) CDP_PORT=9420 ;;
646) CDP_PORT=9430 ;;
opm) CDP_PORT=9440 ;;
esac
GW="10.201.${_idx}.1"; PEER_IP="10.201.${_idx}.2"; SUB="10.201.${_idx}.0/30" GW="10.201.${_idx}.1"; PEER_IP="10.201.${_idx}.2"; SUB="10.201.${_idx}.0/30"
} }