diff --git a/scripts/deploy-remote.sh b/scripts/deploy-remote.sh index ca171e5..2c5418f 100755 --- a/scripts/deploy-remote.sh +++ b/scripts/deploy-remote.sh @@ -1156,10 +1156,20 @@ deploy_llm_medium() { [[ "$missing" -eq 0 ]] || return 1 retire_vllm_medium_quadlets - # The retired proxy held 7770 on the host network; pasta releases it at - # container teardown and a stopped engine lingers in TIME_WAIT just past - # that. Same gate as frank-large's cutover (2026-09-16 addressed-in-use - # failure). + # The thing holding 7770 is now THIS service: on a re-deploy the previous + # llama-server is still bound to it, so waiting for the port without + # stopping the unit deadlocks the deploy (measured 2026-09-16: "FAIL: port + # 7770 is still held after 90s", with the old server happily serving a + # scrape). Stop the unit first, then sweep a stray manual run of the same + # binary -- that is how a benchmark harness leaves the port busy. `pkill -x + # llama-server` matches the process name exactly and can never match the + # deploying shell; never `pkill -f` here. + run_privileged systemctl stop frank-medium.service 2>/dev/null || true + pkill -x llama-server 2>/dev/null || true + sleep 2 + # pasta released the retired proxy's socket at container teardown, and a + # stopped engine lingers in TIME_WAIT just past that. Same gate as + # frank-large's cutover (2026-09-16 addressed-in-use failure). wait_port_free 7770 || return 1 relink_unit frank-medium run_privileged systemctl daemon-reload