Drop containers that no longer exist from the conf lists, after three days absent

A removed container leaves its name behind in every list that named it, and those names go on
being acted upon — a watchdog waiting for a container docker has never heard of. Strikes rather
than a single miss, because a rebuild makes a container vanish for a moment; and the lists naming
containers on the REMOTE are excluded, since pruning those against local docker would empty them.
This commit is contained in:
Gmer4Lfe
2026-08-23 16:54:53 -04:00
parent 206a119a4b
commit fbf2b92167
2 changed files with 229 additions and 0 deletions
+9
View File
@@ -503,6 +503,11 @@
"Arrs_Stack/lidarr_missing_art.sh" # fetch missing album/artist artwork (HOST1 only — self-guards)
"Arrs_Stack/radarr_tmdb_removed.sh" # remove movies dropped from TMDb
"Arrs_Stack/sonarr_tvdb_removed.sh" # remove series dropped from TVDB
# Before the two docker jobs below, deliberately: they pull images and restart
# containers, so a container can legitimately not exist for a moment while they run.
# Reading docker in its settled overnight state keeps a rebuild from costing a strike.
# Three strikes at this cadence means three days genuinely absent before conf is edited.
"Tools/conf_container_prune.sh" # drop containers that no longer exist from the conf lists
"Docker_Essentials/docker_update.sh" # pull container image updates before restart
"Docker_Essentials/docker_daily_restart.sh" # daily container restarts — runs last
# Last, and after git_pull_execute.sh which must always run first. Daily rather than with
@@ -696,6 +701,10 @@
RSYNC_MIN_FREE_GB=50 # warn if any disk backing the remote share is under this
# (0 disables). Online is not writable: a full destination
# makes rsync stall rather than fail. Warns, never aborts.
CONF_PRUNE_STRIKE_LIMIT=3 # consecutive runs a container must be absent from docker
# before its name is removed from the conf lists. A
# rebuild makes a container vanish briefly; one miss
# must never be enough to edit conf.
CRITICAL_CONTAINER_NAMES=() # containers stopped on REMOTE before rsync — profiles override
DELAYED_CONTAINERS=() # containers needing delay before starting — profiles override
CONTAINER_DELAY=5 # seconds before starting delayed containers