-
Bug
-
Resolution: Done
-
Normal
-
6.16.3
-
5
-
False
-
rubygem-foreman-tasks-11.0.3, rubygem-dynflow-1.9.3
-
Moderate
-
Satellite Endeavour Sprint 2, Satellite Endeavour Sprint 3, Satellite Endeavour Sprint 4, Satellite Endeavour Sprint 5
-
sat-endeavour
-
None
-
None
-
None
-
No Coverage
-
Fail
Description of problem:
When stopping foreman tasks via `ForemanTasks::Api::TasksController#bulk_stop` endpoint (stopping, not cancelling), dynflow task remains running.
That prevents further tasks on the same resources, if the task acquires some locks.
How reproducible:
100%
Is this issue a regression from an earlier version:
no
Steps to Reproduce:
1. Create a Content View where publishing it takes >1 minute (or be super-fast in reproducer).
2. Publish the CV and recall the foreman task id.
3. Stop the task via API (there should be some hammer/WebUI way of getting the same API endpoint, but I havent found it):
task_id="3aaa10b7-5521-4162-b279-328cc248c262" curl -u admin:password -X POST -H "Content-Type: application/json" -d "{\"task_ids\": [\"${task_id}\"]}" https://$(hostname -f)/foreman_tasks/api/tasks/bulk_stop
4. Check the task status.
5. Try to publish a new version of the CV.
Actual behavior:
4. Task is in stopped/pending state/result.
5. An attempt to publish it fails with "Required lock is already taken" error, pointing to the stopped/pending task.
Expected behavior:
4. to show stopped/success state/result (or cancelled result?).
5. New publish to work well.
Business Impact / Additional info:
- links to