Resolve docker_network_connect.sh on the mirror, and give the wizard poll time to outlast Phase 2

Step 1b ran the owner's SCRIPTS_ROOT path over SSH on the mirror, so it failed on every appdata install; the wizard poll expired at 5 minutes against a Phase 2 that takes over 4.
This commit is contained in:
Gmer4Lfe
2026-08-17 12:12:10 -04:00
parent 9a1254048e
commit 74e3b8b067
2 changed files with 26 additions and 9 deletions
+17 -5
View File
@@ -850,18 +850,30 @@ if ! ensure_stack_networks_on_remote "$MIRROR_IP" "$MIRROR_SSH_KEY"; then
warn "One or more stack networks could not be prepared on $MIRROR — deploys below may fail"
fi
_net_script="${SCRIPTS_ROOT}/Docker_Essentials/docker_network_connect.sh"
# Resolve the path on the mirror, not here. This used SCRIPTS_ROOT — the OWNER's install path —
# to name a script it then runs over SSH on the MIRROR. That only holds while both hosts install
# to the same place, and an appdata-mode mirror is at /mnt/user/appdata/Varaverk, so bash was
# handed a path that does not exist there and Step 1b failed on every appdata install. The
# warning even printed the owner's path and told the operator to go check it on the mirror.
#
# Same fix as Steps 11 and 12, which already resolve the remote layout this way.
if [[ "$DRY_RUN" == true ]]; then
warn "DRY RUN — would run docker_network_connect.sh on $MIRROR"
STEP_NETWORK_OK=true
elif timeout 60 ssh -i "$MIRROR_SSH_KEY" \
-o ConnectTimeout="$SSH_TIMEOUT" -o BatchMode=yes root@"$MIRROR_IP" \
"bash '$_net_script'" 2>/dev/null; then
else
_mirror_sd=$(resolve_remote_scripts_dir "$MIRROR_IP" "$MIRROR_SSH_KEY" "no")
_net_script="${_mirror_sd}/Docker_Essentials/docker_network_connect.sh"
if timeout 60 ssh -i "$MIRROR_SSH_KEY" \
-o ConnectTimeout="$SSH_TIMEOUT" -o BatchMode=yes -o StrictHostKeyChecking=no \
root@"$MIRROR_IP" \
"[ -f '$_net_script' ] || { echo missing; exit 127; }; bash '$_net_script'" 2>/dev/null; then
echo "Docker network ready on $MIRROR"
STEP_NETWORK_OK=true
else
else
warn "docker_network_connect.sh failed on $MIRROR — containers may fail if network is missing"
warn "Check ${_net_script} on $MIRROR and re-run with --skip-ssh if needed"
fi
unset _mirror_sd
fi
# ── Step 1c: Share setup ─────────────────────────────────────────────────────────────────────
+6 -1
View File
@@ -594,11 +594,16 @@ function vvRenderDone(d) {
// So: reload immediately, and if the partnership is still not green keep asking. Bounded at five
// minutes because a Phase 2 that has not landed by then has failed and the operator should be
// looking at the log, not at a spinner.
//
// Twenty, not five. Five was sized on a Phase 2 that deploys containers and stops; the arr
// bootstrap in Step 9 pushed a real run to 4m05s and it grows with library size, so the poll was
// expiring before the flag landed and the wizard sat unchanged on a partnership that had already
// succeeded — the exact symptom this function exists to remove.
let _vvPartnerPoll = null;
function vvOnJobDone(id, status) {
if (!String(id).includes('partnership_onboard')) { vvLoadChecklist(); return; }
if (_vvPartnerPoll) clearInterval(_vvPartnerPoll);
const deadline = Date.now() + 5 * 60 * 1000;
const deadline = Date.now() + 20 * 60 * 1000;
const check = () => {
fetch('/plugins/varaverk/api/checklist.php?_=' + Date.now())
.then(r => r.json())