When hook_docker_pause is configured, run_docker_cmd() shells out to docker pause -- <list> and treats any non-zero exit as a fatal pre-hook failure (runner.c, run_docker_cmd). docker pause exits non-zero if any target container is already paused, and docker unpause likewise errors if any target is already running.
If a maintenance run is interrupted between the pause and unpause hooks (daemon restart, OOM, crash, or any external docker pause), the array is left with >=1 paused container. The next run's docker pause then hits that already-paused container, exits 1, and snapraidd aborts the entire sync with "Failed to pause docker containers". The following unpause hook also fails (mixed state), so the failure cascades on every subsequent scheduled run until the operator manually runs docker unpause.
A container that is already paused should be treated as successfully paused (idempotent); docker pause should succeed when the end state is "all listed containers paused". Likewise for unpause.
Repro env: snapraidd 4d34fc4 (2026-09-07); Docker 29.7.2; Linux x86_64; daemon started as root via systemd (User=root), drops to nobody and re-acquires root for the docker hook.
When
hook_docker_pauseis configured,run_docker_cmd()shells out todocker pause -- <list>and treats any non-zero exit as a fatal pre-hook failure (runner.c, run_docker_cmd).docker pauseexits non-zero if any target container is already paused, anddocker unpauselikewise errors if any target is already running.If a maintenance run is interrupted between the pause and unpause hooks (daemon restart, OOM, crash, or any external
docker pause), the array is left with >=1 paused container. The next run'sdocker pausethen hits that already-paused container,exits 1, and snapraidd aborts the entire sync with "Failed to pause docker containers". The following unpause hook also fails (mixed state), so the failure cascades on every subsequent scheduled run until the operator manually runsdocker unpause.A container that is already paused should be treated as successfully paused (idempotent);
docker pauseshould succeed when the end state is "all listed containers paused". Likewise for unpause.Repro env: snapraidd 4d34fc4 (2026-09-07); Docker 29.7.2; Linux x86_64; daemon started as root via systemd (User=root), drops to nobody and re-acquires root for the docker hook.