fix: watchdog hardening for Unraid 7.3 + Docker 29.x

- Remove dead DOCKER_TIMEOUT=10 from stability_watchdog (daemon check
  is delegated to docker_watchdog; variable was never used post-refactor)
- Fix parity check detection: parity-date.txt is gone in Unraid 7.3;
  now reads mdResync from var.ini (non-zero = check/sync in progress),
  with parity-date.txt fallback for older versions
- Same is_parity_running() fix in docker_watchdog
- DOCKER_TIMEOUT in docker_watchdog now reads WATCHDOG_DAEMON_TIMEOUT
  from master.conf (default 20s) instead of hardcoded 15s
- WATCHDOG_DAEMON_RESTART_WAIT now reads from master.conf
  (default 900s/15min) instead of hardcoded 30s

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Gmer4Lfe
2026-05-31 19:13:54 -04:00
co-authored by Claude Sonnet 4.6
parent 46b27f609a
commit 4187d52bac
2 changed files with 16 additions and 6 deletions
+7 -2
View File
@@ -129,7 +129,6 @@ acquire_lock
detect_hosts
TOTAL_CORES=$(nproc)
DOCKER_TIMEOUT=10
SYS_WATCHDOG_REBOOT_WINDOW=$(( SYS_WATCHDOG_REBOOT_WINDOW_HRS * 3600 ))
# Ensure state files exist
@@ -300,7 +299,13 @@ check_abort_conditions() {
fi
fi
if grep -q "progress" /var/local/emhttp/parity-date.txt 2>/dev/null; then
# Unraid 7.3+: parity state is in var.ini (mdResync != 0 means check/sync in progress)
# Older: parity-date.txt contained "progress" — check both for compatibility
_md_resync=$(awk -F'"' '/^mdResync=/{print $2}' /var/local/emhttp/var.ini 2>/dev/null)
_parity_running=false
[[ -n "$_md_resync" && "$_md_resync" != "0" ]] && _parity_running=true
grep -q "progress" /var/local/emhttp/parity-date.txt 2>/dev/null && _parity_running=true
if [[ "$_parity_running" == true ]]; then
if [[ "$SYS_WATCHDOG_ABORT_ON_PARITY" == true ]]; then
error "Parity check running — aborting reboot"
notify "System watchdog aborted reboot on $(hostname) ($MY_ID) — parity running" \