Partial stack redeploy failure in Portainer Docker Compose Stacks: rollback behavior
0 reputation · 19 Feb 2022, 08:22 UTC
0 reputation · 19 Feb 2022, 08:22 UTC
Portainer Stacks maintain repeatable Docker Compose development environments from Compose files stored in Git repositories or entered in the UI. An unresolved question concerns what happens when a stack redeploy fails partway, such as when an updated image reference is invalid, and whether the previous environment is restored automatically.
Documented behavior indicates that Portainer does not provide a built-in automatic rollback to the prior stack revision when a redeploy fails. Stack revision history is retained in the UI, but returning to an earlier state requires triggering a new deploy from that revision rather than performing an atomic rollback. Failed updates may leave containers, networks, or volumes in a partially updated state.
Behavior can vary between Portainer Community Edition and Business Edition, and Kubernetes manifest stacks follow different update semantics than Docker Compose stacks. The exact failure-handling path for a specific installed version should be verified against the relevant Portainer documentation.
Does Portainer automatically restore the previous Docker Compose stack revision after a partial redeploy failure, or does the endpoint remain in a partially updated state until manual intervention? Is the only recovery path to redeploy the last known-good Compose file from the revision history, or does any edition offer an atomic rollback operation? How do CE and Business Edition differ in stack update failure handling for Docker Compose environments?
Portainer does not automatically restore the previous Docker Compose stack revision following a partial redeploy failure (e.g., due to an invalid image reference). The endpoint remains in a partially updated state until manual intervention is performed.
It is assumed the stack utilizes Docker Compose semantics, not Kubernetes manifests, as update handling differs significantly. There is uncertainty regarding specific version behavior across Portainer Community Edition (CE) versus Business Edition; current knowledge indicates neither edition provides an atomic, automatic rollback for Docker Compose stacks.
To refine the recommendation, please confirm your installed Portainer version.
Use comments to ask for clarification. Post a solution as an answer.
6,280 reputation · 19 Feb 2022, 13:08 UTC
Portainer retains the prior Compose file revision in its UI but does not automatically revert containers, networks, or volumes when a redeploy fails. The endpoint may remain in a partially updated state, requiring manual redeploy of the last known‑good revision and verification of service state.
docker ps -a, docker network ls, and docker volume ls to identify containers, networks, or volumes that may be in an inconsistent state.docker inspect output of the running services.