refactor: rename failover/HA → fallback across entire codebase
Removes all references to "failover" and "HA" (high availability) terminology from variable names, config keys, state values, rsync profile names, directory paths, and user-visible strings. Mapping: FAILOVER_* → FALLBACK_* FAILOVER_HOST*_RUNS_FOR → FALLBACK_HOST*_COVERS critical-failover → critical-fallback emby-failover → emby-fallback appdata-Failover/ → appdata-Fallback/ "FAILOVER" state value → "FALLBACK" failover_start key → fallback_start Failover/ directory → Fallback/ failover.sh → fallback.sh failover_state.db → fallback_state.db -Failover folder suffix → -Fallback State machine: NORMAL | FALLBACK | DARK (unchanged) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
4e22f5d1f7
commit
009820e981
@@ -65,11 +65,11 @@
|
||||
# Tier 1: array disk paths (/mnt/disk*/sharename)
|
||||
# Tier 2: ZFS pools with find -maxdepth 2 (catches nested cache paths)
|
||||
# Tier 3: shfs fallback — verifies /mnt/user is mounted
|
||||
# Fixes: nested paths like /mnt/cache/appdata-Failover/Critical-Data
|
||||
# Fixes: nested paths like /mnt/cache/appdata-Fallback/Critical-Data
|
||||
# Fixes: ZFS cache pools not detected when share is not at pool root
|
||||
#
|
||||
# v3.3 PROFILE_REMOTE_RESTART_CONTAINERS support added
|
||||
# Dirty sync profiles (critical-failover, emby-failover) restart remote
|
||||
# Dirty sync profiles (critical-fallback, emby-fallback) restart remote
|
||||
# containers after sync if they were running before — picks up config changes
|
||||
# Was stopped → stays stopped. Was running → gets restarted. ✅
|
||||
#
|
||||
@@ -160,7 +160,7 @@ ICON_RAM="💨" # ramdisk operations — fast ephemeral storage
|
||||
ICON_LINK="🔗" # symlink state and management
|
||||
|
||||
# Failover Operations
|
||||
ICON_FAILOVER="🔀" # failover state changes and operations
|
||||
ICON_FALLBACK="🔀" # fallback state changes and operations
|
||||
|
||||
# Docker Network Operations
|
||||
ICON_DOCKER_NET="🔌" # Docker network connect operations
|
||||
@@ -626,13 +626,13 @@ check_connectivity() {
|
||||
info "$ICON_PING $REMOTE_SERVER_NAME is reachable"
|
||||
}
|
||||
|
||||
# Non-fatal ping — used by failover.sh which handles its own state machine.
|
||||
# Non-fatal ping — used by fallback.sh which handles its own state machine.
|
||||
# Returns 0 if reachable, 1 if not — does NOT exit.
|
||||
ping_remote() {
|
||||
ping -c2 -W3 "$REMOTE_SERVER" &>/dev/null
|
||||
}
|
||||
|
||||
# Non-fatal external connectivity check — used by failover.sh.
|
||||
# Non-fatal external connectivity check — used by fallback.sh.
|
||||
# Returns 0 if internet reachable, 1 if not — does NOT exit.
|
||||
ping_internet() {
|
||||
ping -c2 -W3 "${EXTERNAL_IP:-8.8.8.8}" &>/dev/null
|
||||
@@ -649,7 +649,7 @@ ping_internet() {
|
||||
# check_rsync_enabled "DAILY" ← checks RSYNC_ENABLED + DAILY_RSYNC_ENABLED
|
||||
# check_rsync_enabled "WEEKLY" ← checks RSYNC_ENABLED + WEEKLY_RSYNC_ENABLED
|
||||
# check_rsync_enabled "CRITICAL" ← checks RSYNC_ENABLED + CRITICAL_RSYNC_ENABLED
|
||||
# check_rsync_enabled "FAILOVER" ← checks RSYNC_ENABLED + FAILOVER_RSYNC_ENABLED
|
||||
# check_rsync_enabled "FALLBACK" ← checks RSYNC_ENABLED + FALLBACK_RSYNC_ENABLED
|
||||
# check_rsync_enabled ← checks RSYNC_ENABLED only (direct rsync.sh call)
|
||||
#
|
||||
# Returns: 0 = enabled, proceed | 1 = disabled, skip cleanly
|
||||
@@ -895,7 +895,7 @@ check_local_disk_temps() {
|
||||
# Three-tier detection handles all share locations:
|
||||
# Tier 1: Array disk paths — /mnt/disk*/sharename (XFS or ZFS per-disk)
|
||||
# Tier 2: ZFS standalone pools — finds nested paths up to 2 levels deep
|
||||
# catches /mnt/cache/appdata-Failover/Critical-Data correctly
|
||||
# catches /mnt/cache/appdata-Fallback/Critical-Data correctly
|
||||
# Tier 3: shfs fallback — if share exists under /mnt/user, resolve backing pool
|
||||
# or verify shfs itself is mounted if pool can't be determined
|
||||
#
|
||||
@@ -1287,7 +1287,7 @@ acquire_lock() {
|
||||
else
|
||||
error "Another instance of $script_name is already running (PID $existing_pid) — exiting"
|
||||
case "$script_name" in
|
||||
failover|transcode_management|daily_sync_maintenance|system_watchdog)
|
||||
fallback|transcode_management|daily_sync_maintenance|system_watchdog)
|
||||
notify "$script_name lock collision on $(hostname) — concurrent instance detected" "$script_name" "warning"
|
||||
;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user