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

Cancel tasks when server shuts down #5174

matt-richardson opened this issue Dec 18, 2018 · 2 comments


Copy link

commented Dec 18, 2018


  • I have searched open and closed issues to make sure it isn't already requested
  • I have written a descriptive issue title
  • I have linked the original source of this feature request
  • I have tagged the issue appropriately (area/*, kind/enhancement)

The enhancement

When the server is shutdown (or crashes), it leaves running tasks in an unknown state. We currently mark tasks as failed when the server comes back online (or another server in the HA cluster determines its offline).

However, we cancel the tasks during service shutdown, and actively trigger a task cancellation, rather than just marking the task as canceled later. This will mean we can either terminate the task that is running (or cancel at a safe point if its a built in task like retention or susbcription processing).

We should also take advantage of the opportunity to distinguish tasks that were cancelled by a user from tasks that were aborted due to a server crash or shutdown.




At the moment, a task that was cancelled due to a server going offline is marked as failed and has a tooltip explaining the situation - this is the only way to determine something is wrong.


source: internally raised

@matt-richardson matt-richardson self-assigned this Dec 18, 2018
matt-richardson added a commit to OctopusDeploy/OctopusClients that referenced this issue Dec 18, 2018
Relates to Fixes OctopusDeploy/Issues#5174
@octoreleasebot octoreleasebot added this to the 2018.12.1 milestone Jan 24, 2019

This comment has been minimized.

Copy link

commented Jan 24, 2019

Release Note: Attempt to cancel any running tasks when shutting down the Octopus service


This comment has been minimized.

Copy link

commented Apr 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. If you think you've found a related issue, please contact our support team so we can triage your issue, and make sure it's handled appropriately.

@lock lock bot locked as resolved and limited conversation to collaborators Apr 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
2 participants
You can’t perform that action at this time.