Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-33475

bulk_stop of foreman tasks must stop dynflow part as well

XMLWordPrintable

    • 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:

          There are no Sub-Tasks for this issue.

              aruzicka@redhat.com Adam Ruzicka
              rhn-support-pmoravec Pavel Moravec
              Peter Ondrejka Peter Ondrejka
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: