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:
@@ -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
|
||||
echo "Docker network ready on $MIRROR ✅"
|
||||
STEP_NETWORK_OK=true
|
||||
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"
|
||||
_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
|
||||
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 ─────────────────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user