Let a non-blocking checklist item be dismissed with a recorded decision, and run discovery on the mirror once there is something to discover
This commit is contained in:
@@ -40,6 +40,8 @@
|
||||
# prevents arrs treating every file as missing after bootstrap
|
||||
# Step 9e: Webhook listener — start listener on mirror (runs continuously, no reboot needed)
|
||||
# Step 10: Conf push — push master.conf + setup state to all listed hosts
|
||||
# Step 11: Service discovery — conf_populate.sh on the mirror, last, once the stacks it
|
||||
# would discover are actually deployed there
|
||||
#
|
||||
# ==============================================================================================
|
||||
# DESIGN PRINCIPLES
|
||||
@@ -1008,6 +1010,40 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
# ── Step 11: Service discovery on the mirror ──────────────────────────────────────────────────
|
||||
# Deliberately last. conf_populate.sh fills host*.conf from what it can actually find running —
|
||||
# arr API keys, container names, URLs — and until Step 3 and Step 5 deployed the auth and arr
|
||||
# stacks there was nothing on the mirror to find. The wizard runs it during first-run setup,
|
||||
# which on a fresh mirror is precisely the moment the machine is still empty, so everything it
|
||||
# could have discovered was discovered as absent.
|
||||
#
|
||||
# No --overwrite: it only fills blanks, so anything the operator set by hand survives. --no-push
|
||||
# because Step 10 above has just pushed conf; letting discovery push again would race it.
|
||||
echo ""
|
||||
echo "━━━ $ICON_GEAR Step 11 — Service Discovery ($MIRROR) ━━━"
|
||||
|
||||
POPULATE_OK=false
|
||||
if [[ "$MIRROR_REACHABLE" != true ]]; then
|
||||
warn "$MIRROR unreachable — skipping discovery, run Deployment/conf_populate.sh there later"
|
||||
POPULATE_OK=skipped
|
||||
elif [[ "$DRY_RUN" == true ]]; then
|
||||
warn "DRY RUN — would run conf_populate.sh --no-push on $MIRROR"
|
||||
POPULATE_OK=true
|
||||
else
|
||||
_mirror_sd=$(resolve_remote_scripts_dir "$MIRROR_IP" "$MIRROR_SSH_KEY" "no")
|
||||
_pop_script="${_mirror_sd}/Deployment/conf_populate.sh"
|
||||
if timeout 180 ssh -i "$MIRROR_SSH_KEY" \
|
||||
-o ConnectTimeout="$SSH_TIMEOUT" -o BatchMode=yes -o StrictHostKeyChecking=no \
|
||||
root@"$MIRROR_IP" \
|
||||
"[ -f '$_pop_script' ] || { echo missing; exit 127; }; bash '$_pop_script' --no-push" 2>/dev/null; then
|
||||
echo "Discovery complete on $MIRROR ✅"
|
||||
POPULATE_OK=true
|
||||
else
|
||||
warn "Discovery failed on $MIRROR — run $_pop_script there by hand"
|
||||
fi
|
||||
unset _mirror_sd _pop_script
|
||||
fi
|
||||
|
||||
# ── Write Phase 2 completion state ────────────────────────────────────────────────────────────
|
||||
[[ "$ONBOARD_OK" == true && "$DRY_RUN" == false ]] && write_onboard_phase "$MIRROR_ID" 2
|
||||
|
||||
@@ -1040,6 +1076,7 @@ echo " Step 9d — Media seed: $( [[ "$SKIP_MEDIA_SEED" == true ]] && ech
|
||||
|| echo "${MEDIA_SEED_COUNT}/${#DAILY_SYNC_SHARES[@]} shares $(_ok "$MEDIA_SEED_OK")"; } )"
|
||||
echo " Step 9e — Webhook listener: $(_skip "$SKIP_WEBHOOK_LISTENER" "$WEBHOOK_LISTENER_OK")"
|
||||
echo " Step 10 — Conf push: $( [[ "$ONBOARD_OK" == false ]] && echo "skipped" || echo "$(_ok "$MASTER_PUSH_OK")" )"
|
||||
echo " Step 11 — Discovery: $( [[ "$POPULATE_OK" == skipped ]] && echo "skipped (unreachable)" || _ok "$POPULATE_OK" )"
|
||||
echo ""
|
||||
|
||||
if [[ "$ONBOARD_OK" == true ]]; then
|
||||
|
||||
Reference in New Issue
Block a user