Bring script headers onto the template and close safeguard gaps

Headers claimed protections the code never had, and several destructive paths had no
guard against a collapsed config value.
This commit is contained in:
Gmer4Lfe
2026-08-01 20:37:59 -04:00
parent cdce877601
commit e8b114094a
78 changed files with 3301 additions and 277 deletions
+20
View File
@@ -14,6 +14,26 @@
# starts requires a docker restart to pick up the new values.
#
# ==============================================================================================
# OPERATIONAL MODEL
# ==============================================================================================
#
# For each of the three limits (instances, watches, queued events):
#
# 1. Read the current kernel value via sysctl -n
# 2. Compare against the configured target
# exactly equal → skip, nothing to do
# anything else → apply via sysctl -w
#
# Note this enforces the configured value exactly, in both directions: a limit currently
# set HIGHER than the target is lowered back to it. That is deliberate — the conf is the
# single declared source of truth for these limits — but it means raising a limit by hand
# will be silently undone at the next array start. Raise the target in master.conf instead.
#
# Applied at every array start because these are runtime kernel settings that do not
# survive a reboot, and must land before containers launch — a container inherits the
# limits in force at its start, not dynamically.
#
# ==============================================================================================
# DESIGN PRINCIPLES
# ==============================================================================================
#