Skip redundant restart for containers docker_update.sh already rebuilt
docker_update.sh rebuilds (stop+recreate) any container whose image changed, in every mode — but for daily/weekly that was always followed by the restart script's own unconditional pass, stopping and starting the same container twice back to back. docker_update.sh now records which containers it rebuilt this run to a file; docker_daily_restart.sh and docker_weekly_restart.sh read it and skip those specifically, still restarting everything else as before. A file older than DOCKER_UPDATE_REBUILT_STALE_HOURS (default 12) is discarded rather than trusted, so a missed or failed update run can't suppress a restart indefinitely.
This commit is contained in:
@@ -453,6 +453,18 @@
|
||||
# Set false to skip.
|
||||
MONTHLY_REMAINING_UPDATES=true
|
||||
|
||||
# docker_update.sh rebuilds (stop+recreate onto new image) any container whose image changed,
|
||||
# in every mode. For daily/weekly, that rebuild is immediately followed by the restart script's
|
||||
# own unconditional pass — a container that just got rebuilt would be stopped and started again
|
||||
# right after for no reason. docker_update.sh records which containers it rebuilt to these files;
|
||||
# docker_daily_restart.sh / docker_weekly_restart.sh read them and skip those containers rather
|
||||
# than restarting them a second time. A file older than DOCKER_UPDATE_REBUILT_STALE_HOURS is
|
||||
# treated as untrustworthy (docker_update.sh likely didn't run, or didn't run recently) — deleted,
|
||||
# and every container in that tier restarts normally, same as if the file never existed.
|
||||
DOCKER_UPDATE_REBUILT_DAILY_FILE="$DATA_DIR/docker_update_rebuilt_daily.list"
|
||||
DOCKER_UPDATE_REBUILT_WEEKLY_FILE="$DATA_DIR/docker_update_rebuilt_weekly.list"
|
||||
DOCKER_UPDATE_REBUILT_STALE_HOURS=12
|
||||
|
||||
# Shares synced during the weekly maintenance window — defined per host in host*.conf.
|
||||
# HOST1_WEEKLY_SYNC_SHARES / HOST2_WEEKLY_SYNC_SHARES
|
||||
# Containers stopped both sides before sync — full clean state guaranteed.
|
||||
|
||||
Reference in New Issue
Block a user