safeguard: skip watchdog cycle if array not started
Exits cleanly before startup grace check if /mnt/user is not mounted as shfs. Prevents watchdogs running against Docker/storage that isn't available, and blocks false-positive reboots when array is stopped. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
cbf8593225
commit
b9b1d20499
@@ -16,6 +16,11 @@
|
|||||||
# System Watchdog last — only triggers if prior layers could not resolve the issue.
|
# System Watchdog last — only triggers if prior layers could not resolve the issue.
|
||||||
# Rebooting without first reducing pressure may reboot into the same state.
|
# 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 ─────────────────────────────────────────────────────────────────────────────
|
# ── STARTUP GRACE ─────────────────────────────────────────────────────────────────────────────
|
||||||
# No action until system uptime >= WATCHDOG_STARTUP_GRACE seconds.
|
# No action until system uptime >= WATCHDOG_STARTUP_GRACE seconds.
|
||||||
# Prevents false positives from containers still starting at array launch.
|
# Prevents false positives from containers still starting at array launch.
|
||||||
@@ -110,6 +115,14 @@ if [[ "$SHOW_STATUS" == true ]]; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
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 ━━━
|
# ━━━ Startup Grace ━━━
|
||||||
# ==============================================================================================
|
# ==============================================================================================
|
||||||
|
|||||||
Reference in New Issue
Block a user