rename: failover → fallback throughout codebase — this system is Fallback, state is FALLBACK; preserve conventional failover comparisons

This commit is contained in:
Gmer4Lfe
2026-06-01 20:04:17 -04:00
parent 65f6bd7b8a
commit cb7d7a688d
62 changed files with 85 additions and 85 deletions
+24 -24
View File
@@ -35,7 +35,7 @@ User Scripts Enhanced — Kurotaku
```
1. Every script entry → Run in Background: YES
Without background mode the plugin UI freezes waiting for the script to complete.
Long-running scripts and continuous loops (failover, watchdogs) require background.
Long-running scripts and continuous loops (fallback, watchdogs) require background.
There are no exceptions — set background on everything.
2. Run as root: YES
@@ -66,7 +66,7 @@ Create these categories in User Scripts Enhanced before adding any entries:
```
Orchestrators — scheduled maintenance windows and startup launcher
Failover — mutual failover state machine and test tools
Fallback — mutual fallback state machine and test tools
Monitors — weekly reports, health checks, trend tracking
Rsync — manual per-profile sync triggers
Docker_Essentials — container management tools (manual use)
@@ -119,12 +119,12 @@ ramdisk_setup.sh — creates /mnt/ramdisk_transcodes and symlink before
docker_network_connect.sh— ensures custom networks exist + containers connected
stability_watchdog.sh ← last-resort — three-tier server stability watchdog
docker_watchdog.sh ← continuous — two-tier container healing watchdog
fallback.sh ← continuous — mutual failover state machine
fallback.sh ← continuous — mutual fallback state machine
```
**After running:**
One-shot scripts exit cleanly. Three continuous processes run in the background until
the array stops. Check with: `pgrep -f "stability_watchdog\|docker_watchdog\|failover"`
the array stops. Check with: `pgrep -f "stability_watchdog\|docker_watchdog\|fallback"`
---
@@ -291,7 +291,7 @@ in one orchestrated sequence.
---
### ── rsync_emby_failover ─────────────────────────────────────────────────────
### ── rsync_emby_fallback ─────────────────────────────────────────────────────
> **Superseded by `critical_sync_maintenance`.** Delete this User Script from the
> plugin. The emby-fallback dirty sync now runs as step 2 inside
@@ -413,7 +413,7 @@ Background: YES
```
**What it does:**
Reads state files from across the ecosystem — watchdog strikes, failover state, skip
Reads state files from across the ecosystem — watchdog strikes, fallback state, skip
list, bandwidth history, transcode stats, cert expiry — and compiles them into a
digest notification. Reads only, writes nothing.
@@ -421,7 +421,7 @@ digest notification. Reads only, writes nothing.
```
always — sends every run regardless of content (daily digest, even when healthy)
smart — sends only when something worth reporting is found
triggers: watchdog strikes, non-NORMAL failover, cert warnings, bandwidth spikes
triggers: watchdog strikes, non-NORMAL fallback, cert warnings, bandwidth spikes
weekly — sends once per week on DIGEST_DAY (Sunday), silent all other days
```
@@ -642,7 +642,7 @@ that survive rsync updates without parser changes.
---
## ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
## 🔄 FAILOVER
## 🔄 FALLBACK
## ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
> **fallback.sh is started by array_started.sh — not scheduled separately.**
@@ -650,11 +650,11 @@ that survive rsync updates without parser changes.
---
### ── failover_status ─────────────────────────────────────────────────────────
### ── fallback_status ─────────────────────────────────────────────────────────
```
Category: Failover
Name: failover_status
Category: Fallback
Name: fallback_status
Schedule: None — run manually
Background: NO (runs and exits — status check)
```
@@ -665,21 +665,21 @@ Background: NO (runs and exits — status check)
```
**What it does:**
Shows current failover state at a glance without affecting the running loop.
State (NORMAL/FAILOVER/NO_INTERNET/DARK). Which tier containers are active.
Outage duration if in FAILOVER. Handback strike count if remote has returned.
Shows current fallback state at a glance without affecting the running loop.
State (NORMAL/FALLBACK/NO_INTERNET/DARK). Which tier containers are active.
Outage duration if in FALLBACK. Handback strike count if remote has returned.
DDNS containers currently running. Remote server Tailscale visibility.
**Use before any manual failover intervention.** Understanding the current state
**Use before any manual fallback intervention.** Understanding the current state
before acting prevents making things worse.
---
### ── failover_test ────────────────────────────────────────────────────────────
### ── fallback_test ────────────────────────────────────────────────────────────
```
Category: Failover
Name: failover_test
Category: Fallback
Name: fallback_test
Schedule: None — run manually (during a planned maintenance window)
Background: YES — test takes several minutes
```
@@ -690,7 +690,7 @@ Background: YES — test takes several minutes
```
**What it does:**
Validates the full failover lifecycle — detection, Tier 1 container start, handback,
Validates the full fallback lifecycle — detection, Tier 1 container start, handback,
container stop, DNS return — using an iptables rule to simulate remote unreachability.
No real outage. Safety trap removes the iptables rule on any exit condition including
ctrl-c and crashes — remote is always reachable after the test.
@@ -702,7 +702,7 @@ ctrl-c and crashes — remote is always reachable after the test.
**For a live test** (real container lifecycle, brief service interruption):
Change `--dry-run` to nothing and run during a maintenance window.
**8 phases:** pre-flight → block remote → detect FAILOVER → verify Tier 1 started
**8 phases:** pre-flight → block remote → detect FALLBACK → verify Tier 1 started
→ restore remote → wait for handback → verify NORMAL restored → report pass/fail.
---
@@ -711,7 +711,7 @@ Change `--dry-run` to nothing and run during a maintenance window.
> **Not yet built.** `fallback_state_reset.sh` is a planned utility — not in `Fallback/` yet.
>
> **Manual workaround** when state file is stuck in FAILOVER after a failed test or
> **Manual workaround** when state file is stuck in FALLBACK after a failed test or
> forced kill of fallback.sh:
> ```bash
> # Verify first — right containers on right server, DDNS correct, fallback.sh not running
@@ -721,7 +721,7 @@ Change `--dry-run` to nothing and run during a maintenance window.
> Resets state only — does NOT start or stop any containers.
**When you need this:**
State file stuck in FAILOVER after a test that didn't complete cleanly. After killing
State file stuck in FALLBACK after a test that didn't complete cleanly. After killing
fallback.sh directly (not via plugin Abort button). After a failed handback.
**Verify before resetting:**
@@ -1615,7 +1615,7 @@ Wrong startup setup (old approach):
docker_syslog_filter — At Startup of Array
stability_watchdog — Every 15 Minutes via watchdog_orchestrator
docker_watchdog — At Startup of Array
failover — At Startup of Array
fallback — At Startup of Array
(unpredictable order, no coordination)
```
@@ -1680,7 +1680,7 @@ array_start --dry-run verify all startup scripts found and sequenced co
transcode_management --status confirm ramdisk mounted and symlink pointing at ramdisk
critical_sync_maintenance verify Critical-Data sync completes to HOST2
daily_sync_maintenance --dry-run verify remote connectivity and share list
failover_status confirm NORMAL state on both servers
fallback_status confirm NORMAL state on both servers
docker_watchdog_status confirm required containers all running
stability_watchdog_status confirm no threshold alerts on first check
```