Add the ability to abort running workflows

Registered by Greg Hill

We should add the ability to abort running workflows by calling an abort() method on the engine object. This would cause the workflow to stop running and roll back all tasks as soon as the current task finishes.

If possible, it would be desirable that this be achievable via the job board (perhaps by setting an ABORT status or something?).

Blueprint information

Status:
Not started
Approver:
Joshua Harlow
Priority:
Medium
Drafter:
Greg Hill
Direction:
Needs approval
Assignee:
Greg Hill
Definition:
Discussion
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

So some ideas:

Figure out what aborting means to the current state-transition table.

It will likely be a new state that will need to be thought out what are the consequences (and associated new valid state transitions) of adding this.

See: https://github.com/openstack/taskflow/blob/master/taskflow/states.py#L59

[MP] Not sure I agree with aborting via call to the engine. If you're in the same process space as the engine, you could just as easily kill it, no? An ability to "Abort"/"Cancel" and an ability to "Kill" are required from the Job submitter's perspective, which would ideally be done via jobboard. Also, as we discussed in IRC it would be nice to draw the distinction between an "abort" or "cancel" and "kill". I think "abort" or "cancel" should result in a revert of everything while a "kill" results in the workflow abandoning everything in place, similar to a SIGINT vs SIGKILL in UNIX.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.