diff --git a/Orchestrators/watchdog_orchestrator.sh b/Orchestrators/watchdog_orchestrator.sh index 56d6e4c..4f69288 100755 --- a/Orchestrators/watchdog_orchestrator.sh +++ b/Orchestrators/watchdog_orchestrator.sh @@ -16,6 +16,11 @@ # System Watchdog last — only triggers if prior layers could not resolve the issue. # Rebooting without first reducing pressure may reboot into the same state. # +# ── ARRAY CHECK ─────────────────────────────────────────────────────────────────────────────── +# Exits immediately if /mnt/user is not mounted as shfs (array not started). +# Watchdogs check Docker containers and storage — meaningless without the array. +# Prevents false positives and unnecessary reboots when array is stopped or stopping. +# # ── STARTUP GRACE ───────────────────────────────────────────────────────────────────────────── # No action until system uptime >= WATCHDOG_STARTUP_GRACE seconds. # Prevents false positives from containers still starting at array launch. @@ -110,6 +115,14 @@ if [[ "$SHOW_STATUS" == true ]]; then exit 0 fi +# ============================================================================================== +# ━━━ Array Check ━━━ +# ============================================================================================== +if ! df --output=fstype /mnt/user 2>/dev/null | grep -q shfs; then + log "Array not started — skipping watchdog cycle" + exit 0 +fi + # ============================================================================================== # ━━━ Startup Grace ━━━ # ==============================================================================================