Sync master.conf.template schema to match live master.conf
STATE_DIR introduced, DATA_DIR path updated to flash, all state files migrated from /tmp and /boot/config root to $STATE_DIR. TRANSCODE_STATE_FILE and DOCKER_WATCHDOG_FAILED_FILE added; SYS_WATCHDOG_FAILED_FILE renamed to DOCKER_WATCHDOG_FAILED_FILE to reflect what it actually tracks.
This commit is contained in:
@@ -111,11 +111,15 @@
|
|||||||
# ==============================================================================================
|
# ==============================================================================================
|
||||||
# ── SHARED HOST CONFIGURATION ─────────────────────────────────────────────────────────────────
|
# ── SHARED HOST CONFIGURATION ─────────────────────────────────────────────────────────────────
|
||||||
# ==============================================================================================
|
# ==============================================================================================
|
||||||
# DATA_DIR is the same path on all servers — persistent script state and statistics.
|
# Requirement: internal NVMe/SSD boot drive. Everything lives in the plugin folder on flash —
|
||||||
# Array share — survives reboots, no flash drive wear.
|
# scripts, state, and data are all available before the array mounts.
|
||||||
# Created automatically if it doesn't exist.
|
# Both directories are created automatically if they don't exist.
|
||||||
# Only truly critical files (fallback state, watchdog reboot log) stay on /boot/config.
|
#
|
||||||
DATA_DIR="/mnt/user/appdata/Varaverk/data"
|
# DATA_DIR — historical logs, statistics, discovery histories, blocklists
|
||||||
|
# STATE_DIR — runtime state files for all scripts (watchdogs, fallback, transcode, etc.)
|
||||||
|
# Requirement: ALL state files MUST use $STATE_DIR. No /tmp, no /boot/config root.
|
||||||
|
DATA_DIR="/boot/config/plugins/varaverk/data"
|
||||||
|
STATE_DIR="/boot/config/plugins/varaverk/State_Files"
|
||||||
|
|
||||||
# ── Version Parity ──
|
# ── Version Parity ──
|
||||||
# Controls behaviour when local and remote unRAID versions differ.
|
# Controls behaviour when local and remote unRAID versions differ.
|
||||||
@@ -185,6 +189,11 @@
|
|||||||
PARTNERSHIP_OFFLINE_THRESHOLD=30 # days either server unreachable before auto-offboard
|
PARTNERSHIP_OFFLINE_THRESHOLD=30 # days either server unreachable before auto-offboard
|
||||||
# works both directions independently
|
# works both directions independently
|
||||||
|
|
||||||
|
# Partnership and setup state files — all in STATE_DIR per the project requirement.
|
||||||
|
# Scripts use these variables; do not hardcode /boot/config paths in scripts.
|
||||||
|
PARTNERSHIP_BLOCKLIST_FILE="$STATE_DIR/partnership_blocklist.db"
|
||||||
|
VARAVERK_SETUP_FILE="$STATE_DIR/varaverk_setup.db"
|
||||||
|
|
||||||
# Tailscale removal on offboard.
|
# Tailscale removal on offboard.
|
||||||
PARTNERSHIP_REMOVE_TAILSCALE=true # remove mirror from Tailscale tailnet on offboard
|
PARTNERSHIP_REMOVE_TAILSCALE=true # remove mirror from Tailscale tailnet on offboard
|
||||||
# false = skip removal (manual or testing)
|
# false = skip removal (manual or testing)
|
||||||
@@ -421,7 +430,7 @@
|
|||||||
|
|
||||||
MONTHLY_UPTIME_THRESHOLD_DAYS=30 # minimum uptime in days before maintenance fires
|
MONTHLY_UPTIME_THRESHOLD_DAYS=30 # minimum uptime in days before maintenance fires
|
||||||
MONTHLY_RUN_INTERVAL_DAYS=30 # minimum days since last run before running again
|
MONTHLY_RUN_INTERVAL_DAYS=30 # minimum days since last run before running again
|
||||||
MONTHLY_LAST_RUN_FILE="/boot/config/monthly_maintenance_last_run.db"
|
MONTHLY_LAST_RUN_FILE="$STATE_DIR/monthly_maintenance_last_run.db"
|
||||||
|
|
||||||
# ━━━ Sunday Morning Coffee Report ━━━
|
# ━━━ Sunday Morning Coffee Report ━━━
|
||||||
# Orchestrator that runs all Sunday monitor scripts in sequence.
|
# Orchestrator that runs all Sunday monitor scripts in sequence.
|
||||||
@@ -634,7 +643,7 @@
|
|||||||
EXTERNAL_IP="8.8.8.8"
|
EXTERNAL_IP="8.8.8.8"
|
||||||
FALLBACK_CHECK_INTERVAL=30 # seconds between fallback state checks
|
FALLBACK_CHECK_INTERVAL=30 # seconds between fallback state checks
|
||||||
FALLBACK_HANDBACK_STRIKES=3 # consecutive healthy checks before initiating handback (3×30s = 90s)
|
FALLBACK_HANDBACK_STRIKES=3 # consecutive healthy checks before initiating handback (3×30s = 90s)
|
||||||
FALLBACK_STATE_FILE="/boot/config/fallback_state.db"
|
FALLBACK_STATE_FILE="$STATE_DIR/fallback_state.db"
|
||||||
FALLBACK_ENABLED=false # set true once both servers are configured and paired
|
FALLBACK_ENABLED=false # set true once both servers are configured and paired
|
||||||
# false = suppresses "not running" warnings in status scripts
|
# false = suppresses "not running" warnings in status scripts
|
||||||
FALLBACK_PARTNERSHIP_REQUIRED=true # gate fallback on an active partnership
|
FALLBACK_PARTNERSHIP_REQUIRED=true # gate fallback on an active partnership
|
||||||
@@ -702,7 +711,7 @@
|
|||||||
# HOST*_WATCHDOG_DEPENDENCIES — dependency ordering for restart decisions
|
# HOST*_WATCHDOG_DEPENDENCIES — dependency ordering for restart decisions
|
||||||
|
|
||||||
# Strike state file — /tmp resets on reboot (correct — no stale strikes after reboot)
|
# Strike state file — /tmp resets on reboot (correct — no stale strikes after reboot)
|
||||||
WATCHDOG_STATE_FILE="/tmp/container_watchdog_state.db"
|
WATCHDOG_STATE_FILE="$STATE_DIR/container_watchdog_state.db"
|
||||||
|
|
||||||
# CPU thresholds — normalised against total core count at runtime
|
# CPU thresholds — normalised against total core count at runtime
|
||||||
SOFT_CPU_THRESHOLD=80 # warn at this % of total system CPU
|
SOFT_CPU_THRESHOLD=80 # warn at this % of total system CPU
|
||||||
@@ -769,8 +778,8 @@
|
|||||||
WATCHDOG_APPDATA_LOG_MAX_GB=2 # flag *.log files exceeding this size (absolute)
|
WATCHDOG_APPDATA_LOG_MAX_GB=2 # flag *.log files exceeding this size (absolute)
|
||||||
WATCHDOG_APPDATA_TRUNCATE_LOGS=false # set true to auto-truncate oversized *.log files on action cycle
|
WATCHDOG_APPDATA_TRUNCATE_LOGS=false # set true to auto-truncate oversized *.log files on action cycle
|
||||||
WATCHDOG_APPDATA_STRIKE_LIMIT=3 # cycles before action fires (matches existing watchdog pattern)
|
WATCHDOG_APPDATA_STRIKE_LIMIT=3 # cycles before action fires (matches existing watchdog pattern)
|
||||||
WATCHDOG_APPDATA_GROWTH_FILE="/tmp/watchdog_appdata_growth.db" # /tmp — resets on reboot ✅
|
WATCHDOG_APPDATA_GROWTH_FILE="$STATE_DIR/watchdog_appdata_growth.db"
|
||||||
STORAGE_WATCHDOG_STATE_FILE="/tmp/storage_watchdog_state.db" # /tmp — resets on reboot ✅
|
STORAGE_WATCHDOG_STATE_FILE="$STATE_DIR/storage_watchdog_state.db"
|
||||||
|
|
||||||
# ━━━ Docker Network Connect ━━━
|
# ━━━ Docker Network Connect ━━━
|
||||||
# Ensures custom networks exist and connects containers at array start.
|
# Ensures custom networks exist and connects containers at array start.
|
||||||
@@ -856,7 +865,7 @@
|
|||||||
NETWORK_WATCHDOG_CHECK_TAILSCALE=true
|
NETWORK_WATCHDOG_CHECK_TAILSCALE=true
|
||||||
NETWORK_WATCHDOG_NPM_TIMEOUT=10
|
NETWORK_WATCHDOG_NPM_TIMEOUT=10
|
||||||
NETWORK_WATCHDOG_NPM_STRIKE_LIMIT=2
|
NETWORK_WATCHDOG_NPM_STRIKE_LIMIT=2
|
||||||
NETWORK_WATCHDOG_NPM_STATE_FILE="/tmp/network_watchdog_state.db"
|
NETWORK_WATCHDOG_NPM_STATE_FILE="$STATE_DIR/network_watchdog_state.db"
|
||||||
|
|
||||||
# ━━━ WebGUI Watchdog ━━━
|
# ━━━ WebGUI Watchdog ━━━
|
||||||
# Monitors unRAID WebGUI responsiveness — escalates through nginx restart → emhttp restart.
|
# Monitors unRAID WebGUI responsiveness — escalates through nginx restart → emhttp restart.
|
||||||
@@ -1165,6 +1174,7 @@
|
|||||||
TRANSCODE_MANAGER_MODE="smart"
|
TRANSCODE_MANAGER_MODE="smart"
|
||||||
|
|
||||||
# Daily statistics log — read by weekly_health_digest.sh for transcode summary.
|
# Daily statistics log — read by weekly_health_digest.sh for transcode summary.
|
||||||
|
TRANSCODE_STATE_FILE="$STATE_DIR/transcode_state.db"
|
||||||
TRANSCODE_DAILY_LOG="$DATA_DIR/transcode_daily.db"
|
TRANSCODE_DAILY_LOG="$DATA_DIR/transcode_daily.db"
|
||||||
TRANSCODE_LOG_RETENTION=90 # days before old entries purged
|
TRANSCODE_LOG_RETENTION=90 # days before old entries purged
|
||||||
|
|
||||||
@@ -1265,7 +1275,7 @@
|
|||||||
# HOST*_RW_STOP_CONTAINERS — docker stop at hard pressure (in host*.conf)
|
# HOST*_RW_STOP_CONTAINERS — docker stop at hard pressure (in host*.conf)
|
||||||
|
|
||||||
RW_ENABLED=true
|
RW_ENABLED=true
|
||||||
RW_STATE_FILE="/tmp/resource_watchdog_state.db"
|
RW_STATE_FILE="$STATE_DIR/resource_watchdog_state.db"
|
||||||
|
|
||||||
# ━━━ Pressure Thresholds ━━━
|
# ━━━ Pressure Thresholds ━━━
|
||||||
# Graduated RAM response — resource_watchdog acts before system_watchdog reboots.
|
# Graduated RAM response — resource_watchdog acts before system_watchdog reboots.
|
||||||
@@ -1335,10 +1345,10 @@
|
|||||||
# Warn/shutdown/recover RAM tiers are handled by resource_watchdog.sh
|
# Warn/shutdown/recover RAM tiers are handled by resource_watchdog.sh
|
||||||
|
|
||||||
# ━━━ State Files ━━━
|
# ━━━ State Files ━━━
|
||||||
SYS_WATCHDOG_STATE_FILE="/tmp/system_watchdog_state.db" # /tmp — resets on reboot ✅
|
SYS_WATCHDOG_STATE_FILE="$STATE_DIR/system_watchdog_state.db"
|
||||||
SYS_WATCHDOG_FAILED_FILE="/boot/config/system_watchdog_failed.db"
|
DOCKER_WATCHDOG_FAILED_FILE="$STATE_DIR/docker_watchdog_failed.db"
|
||||||
SYS_WATCHDOG_REBOOT_LOG="/boot/config/system_watchdog_reboots.db"
|
SYS_WATCHDOG_REBOOT_LOG="$STATE_DIR/system_watchdog_reboots.db"
|
||||||
SYS_WATCHDOG_OOM_FILE="/tmp/system_watchdog_oom.db" # /tmp — resets on reboot ✅
|
SYS_WATCHDOG_OOM_FILE="$STATE_DIR/system_watchdog_oom.db"
|
||||||
|
|
||||||
# ━━━ Strike and Reboot Loop Settings ━━━
|
# ━━━ Strike and Reboot Loop Settings ━━━
|
||||||
# Strike system: a check must fail this many consecutive cycles before action is taken.
|
# Strike system: a check must fail this many consecutive cycles before action is taken.
|
||||||
|
|||||||
Reference in New Issue
Block a user