Project

General

Profile

Actions

Bug #34344

closed

Add real support for force cancelling tasks

Added by Adam Ruzicka almost 3 years ago. Updated 5 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=2047787

Description of problem:
Tasks/dynflow does not have real support for force cancelling.

The only thing we had was unlocking, which turned the task into stopped state without touching the execution plan iff the task was paused. We also had force unlocking, which did the same thing but it didn't care if the task was paused or not. The important thing is that after an unlock, resources locked by this task were free to be used again.

We also had cancellation, which required cooperation from the task itself and in general was rather asynchronous. It could take quite some time for the cancellation to propagate through the whole task. Another issue is there were tasks which weren't cancellable at all.

During a UI refresh we added a "force cancel" action to the ui, but it was just a rebrand of "force unlock". It unlocked the resources, turned the task over to stopped, but nothing told dynflow to actually stop doing things with the execution plan.

Tasks were always meant just as a frontend to dynflow, tasks are updated when things happen in dynflow. If we change the task directly, but dynflow keeps going, it may overwrite the changes we did to the task by hand.

Version-Release number of selected component (if applicable):
Satellite 6.9, 6.10, 7.0, possibly even older releases

How reproducible:
Sometimes

Steps to Reproduce:
1. Have a task which takes a long time, such as content sync
2. Let it run for a while
3. Force cancel it
4. Observe the task and its corresponding execution plan in dynflow console
5. Restart dynflow-sidekiq@* services

Actual results:
At 4 the task is stopped, the execution plan is still running.
At 5 there is a slight change the execution plan will still be running and the task as well.

Expected results:
At 4 both the task an execution plan are stopped. Steps of the execution plan might still be running, but that should be ok, the important thing is it won't progress anymore.
At 5, both are stopped, there should be no running steps.

Additional info:
We will need to add support for force cancellation to dynflow and then make tasks use it.

Actions #1

Updated by The Foreman Bot almost 3 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman-tasks/pull/669 added
Actions #2

Updated by Adam Ruzicka 5 months ago

  • Status changed from Ready For Testing to Closed
Actions #3

Updated by Adam Ruzicka 5 months ago

  • Fixed in Releases foreman_tasks-9.2.0 added
Actions

Also available in: Atom PDF