-
Notifications
You must be signed in to change notification settings - Fork 802
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to rollback in case of catastrophic error? #90
Comments
Sounds good. Any news about it? |
That is not something watchtower currently aims to solve. I do like the idea however. Do you have any suggestions on how this would work? |
Closing due to lack of response. |
I think if the docker container fails to start/restart within a set period of time or its HEALTHCHECK fails, watchtower could rollback to previous version of the container? |
This seems like an essential idea. Has there been any progress on this note? |
No, there isn't anything like a "rollback" that watchtower can perform, even if it wanted to. In theory, it could hold on to the previous image and try to recreate the container with that image, but the most common reason for an update to fail is that the container uses something that watchtower doesn't understand. In such a case, recreating the container using the old image is unlikely to fare any better. |
Personally that's not what I'm after. I'd like to be able to rollback to previous versions for example not only if something crashes but mainly if I notice that something has a regression (but the container is still working ok). On Watchtower side, I'm guessing this would mean:
Agreed. It's the primary reason I'm not using watchtower even though I was very interested in it initially (and still am). But with automatic upgrade, I need super easy rollback capabilities built in. |
I'd also like this, I say this as watchtower upgraded to a latest that is broken/untested on my hardware setup. |
None of this is compatible with how watchtower is structured today, it's stateless and UI-less (except for the CLI args/Env vars, but those are one-way). It could be done, but it would be a great effort (and perhaps alter the role of watchtower, which other users might not be be happy about), but the main problem is simply that no one is doing it. Watchtower is a community project and we are merely maintainers. |
Another issue: what if an upgrade caused a database migration, and that container's database code doesn't support rollback / downgrade? |
That issue would be on the container, not watchtower. |
I agree, but it seems likely that watchtower would be blamed when a rollback fails. "Blame" isn't a great word here, I'm just not sure how common it is for containers to support rolling back to older images. Surely stateless/simple images would be fine. Maybe it's just another case where a non-rollback-able container would need to be excluded from automated watchtower upgrades... but that means more hands-on sysadmin, communication, and research into which containers will be fine and which ones won't, and I use watchtower specifically to keep containers up to date with less manual work. 🤷 |
You're over thinking this IMHO |
Well the title says it all - how to roll back in case an updated container breaks?
The text was updated successfully, but these errors were encountered: