Bug 1895324 - hammer task resume has broken.
Summary: hammer task resume has broken.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Tasks Plugin
Version: 6.9.0
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: 6.9.0
Assignee: Adam Ruzicka
QA Contact: Jameer Pathan
URL:
Whiteboard:
Depends On:
Blocks: 1934406
TreeView+ depends on / blocked
 
Reported: 2020-11-06 10:48 UTC by Suraj Patil
Modified: 2021-04-21 13:19 UTC (History)
6 users (show)

Fixed In Version: tfm-rubygem-foreman-tasks-3.0.3
Doc Type: Known Issue
Doc Text:
The `hammer task resume` command does not resume all paused tasks and produces the following error: "Please provide at least one of the search or task_ids parameters in the request."
Clone Of:
: 1934406 (view as bug list)
Environment:
Last Closed: 2021-04-21 13:18:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 31508 0 Normal Closed hammer task resume has broken. 2021-02-20 01:59:24 UTC
Red Hat Product Errata RHSA-2021:1313 0 None None None 2021-04-21 13:19:10 UTC

Internal Links: 1907802

Description Suraj Patil 2020-11-06 10:48:36 UTC
Description of problem:
# hammer task resume command is not resuming all paused tasks as before.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[root@satellite ~]# hammer task --help 
Usage:
    hammer task [OPTIONS] SUBCOMMAND [ARG] ...

Parameters:
 SUBCOMMAND                    Subcommand
 [ARG] ...                     Subcommand arguments

Subcommands:
 info                          Show task details
 list                          List tasks
 progress                      Show the progress of the task
 resume                        Resume all tasks paused in error state   <<=======
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Currently command is raising the error - "Please provide at least one of search or task_ids parameters in the request". 


Version-Release number of selected component (if applicable):
Satellite 6.9


Actual results:
[root@satellite ~]# hammer task resume
400 Bad Request
  Please provide at least one of search or task_ids parameters in the request

Expected results:
Try to resume all the paused tasks without the need of providing task_ids as before. 

Additional info:

This issue seems to happen due to removal of scope search in below commit. 

https://github.com/theforeman/foreman-tasks/pull/516/files#diff-d5548a710d9ec9031997c62d4520fe761970aaa226d123b05af0a9949ab2e4dfL96

Comment 1 Adam Ruzicka 2020-11-06 11:44:04 UTC
Until this gets gixed, the workaround is to run hammer task resume --search ""

Comment 3 Jameer Pathan 2021-02-17 06:31:04 UTC
Verified

Verified with:
- Satellite 6.9.0 snap 13

Test steps:
- Publish a content view and cancel the task to create a paused task.
- Run "hammer task resume"

Observations:
- Task resumed and completed successfully.

hammer> task resume
Total tasks found paused in error state: 1
Total tasks resumed:                     1
Resumed tasks:                           
 1) Task identifier: 9bab2b65-7a32-479f-be26-e5b31611d7c0
    Task action:     Publish
    Task errors:     Task canceled, Task canceled, Task canceled, Task canceled, Task canceled, Task canceled
Total tasks failed to resume:            0
Failed tasks:                            

Total tasks skipped:                     0
Skipped tasks:

Comment 6 errata-xmlrpc 2021-04-21 13:18:52 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: Satellite 6.9 Release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:1313


Note You need to log in before you can comment on or make changes to this bug.