Skip to content
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

Add support for rolling back on a failed update #64

Merged
merged 2 commits into from
Jan 12, 2022
Merged

Add support for rolling back on a failed update #64

merged 2 commits into from
Jan 12, 2022

Conversation

andrasmaroy
Copy link
Contributor

docker service update will exit with 1 and write something like service update paused: update paused due to failure or early termination of task ... to stderr if the updated service fails to start or remains unhealthy.

By setting the ROLLBACK_ON_FAILURE variable if an update fails Shepherd will roll it1 back to the previous version, thus avoiding a service failure as a result of the update. If the Apprise Sidecar is set it will also send a notification about this.

`docker service update` will exit with `1` and write something like
`service update paused: update paused due to failure or early termination of task ...`
to stderr if the updated service fails to start or remains unhealthy.

With this change this event appears in the logs explicitly.
By setting the `ROLLBACK_ON_FAILURE` variable if an update fails
Shepherd will roll it back to the previous version, thus avoiding a
service failure as a result of the update.
If the Apprise Sidecar is set it will also send a notification about
this.
@djmaze djmaze merged commit cf497f4 into containrrr:master Jan 12, 2022
@djmaze
Copy link
Collaborator

djmaze commented Jan 12, 2022

@andrasmaroy Very cool and useful addition, thanks!

Just added one more line in order to skip the success notification after rollback.

@djmaze djmaze added this to the 0.6.0 milestone Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants