Polish before first GitHub push: consistent adapter usage and naming
stability_watchdog.sh mover check now uses platform_is_mover_running() instead of raw pgrep, matching server_reboot.sh. check_unraid_version_parity() renamed to check_os_version_parity() — the function internals were already platform-neutral after the adapter refactor; the name was the last Unraid artifact.
This commit is contained in:
@@ -662,7 +662,7 @@ run_handback() {
|
||||
echo ""
|
||||
echo "━━━ $ICON_SHIELD Pre-flight ━━━"
|
||||
|
||||
if ! check_unraid_version_parity; then
|
||||
if ! check_os_version_parity; then
|
||||
warn "Version parity check failed — aborting handback, will retry next cycle"
|
||||
state_set handback_strikes 0
|
||||
return 1
|
||||
|
||||
@@ -257,7 +257,7 @@ else
|
||||
fi
|
||||
|
||||
# Version parity — test may produce misleading results on mismatch
|
||||
if ! check_unraid_version_parity; then
|
||||
if ! check_os_version_parity; then
|
||||
error "unRAID version mismatch — test aborted to prevent misleading results"
|
||||
phase_fail "Pre-flight"
|
||||
exit 1
|
||||
|
||||
@@ -180,7 +180,7 @@ check_connectivity
|
||||
log "Connectivity to $REMOTE_SERVER_NAME ✅"
|
||||
|
||||
# Version parity — mismatched unRAID could cause md5sum path differences
|
||||
check_unraid_version_parity || {
|
||||
check_os_version_parity || {
|
||||
warn "Version parity check failed — proceeding with caution"
|
||||
warn "Checksum results may be unreliable if md5sum path changed between versions"
|
||||
}
|
||||
|
||||
@@ -1222,7 +1222,7 @@ if [[ "$MODE" == "onboard" ]]; then
|
||||
check_connectivity
|
||||
|
||||
# Version parity — both servers must agree on unRAID version
|
||||
check_unraid_version_parity || exit 1
|
||||
check_os_version_parity || exit 1
|
||||
|
||||
# Remote array and Docker daemon
|
||||
check_remote_array || exit 1
|
||||
|
||||
+2
-2
@@ -52,7 +52,7 @@
|
||||
# Written at offboard — prevents stale access after a partnership ends.
|
||||
#
|
||||
# Version Parity
|
||||
# check_unraid_version_parity — refuses sync if servers on incompatible unRAID versions.
|
||||
# check_os_version_parity — refuses sync if servers on incompatible unRAID versions.
|
||||
#
|
||||
# Remote Health Pre-flights
|
||||
# check_connectivity() — Tailscale IP reachable before any SSH
|
||||
@@ -248,7 +248,7 @@ else
|
||||
fi
|
||||
|
||||
# Version parity — refuse if servers on incompatible unRAID versions
|
||||
check_unraid_version_parity || exit 1
|
||||
check_os_version_parity || exit 1
|
||||
|
||||
check_connectivity
|
||||
check_remote_rootfs
|
||||
|
||||
@@ -311,7 +311,7 @@ check_abort_conditions() {
|
||||
fi
|
||||
fi
|
||||
|
||||
if pgrep -f "mover" >/dev/null 2>&1; then
|
||||
if platform_is_mover_running; then
|
||||
if [[ "$SYS_WATCHDOG_ABORT_ON_MOVER" == true ]]; then
|
||||
error "Mover running — aborting reboot"
|
||||
notify "System watchdog aborted reboot on $(hostname) ($MY_ID) — mover running" \
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
#
|
||||
#
|
||||
# Three new safety functions added:
|
||||
# check_unraid_version_parity() — refuses remote ops on version mismatch
|
||||
# check_os_version_parity() — refuses remote ops on version mismatch
|
||||
# reads OS version via platform_get_os_version() / platform_os_version_probe_cmd()
|
||||
# major mismatch → abort | minor mismatch → configurable warn/abort
|
||||
# check_remote_docker_daemon() — verifies remote Docker daemon before
|
||||
@@ -1748,9 +1748,9 @@ check_api() {
|
||||
# "abort" — exit the calling script (default for major version differences)
|
||||
# Major version mismatch always aborts regardless of setting
|
||||
#
|
||||
# Usage: check_unraid_version_parity || exit 1
|
||||
# Usage: check_os_version_parity || exit 1
|
||||
|
||||
check_unraid_version_parity() {
|
||||
check_os_version_parity() {
|
||||
local local_version remote_version
|
||||
|
||||
# Read local version
|
||||
|
||||
Reference in New Issue
Block a user