Bug 1907802 - foreman-maintain paused task check fails.
Summary: foreman-maintain paused task check fails.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Foreman Maintain
Version: 6.8.0
Hardware: x86_64
OS: Linux
unspecified
high vote
Target Milestone: 6.9.0
Assignee: Suraj Patil
QA Contact: Gaurav Talreja
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-12-15 09:43 UTC by Suraj Patil
Modified: 2021-04-21 14:48 UTC (History)
4 users (show)

Fixed In Version: rubygem-foreman_maintain-0.7.2-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-04-21 14:48:24 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 31512 0 Normal Closed foreman-maintain paused task check fails. 2021-02-11 08:20:23 UTC
Red Hat Bugzilla 1895324 0 unspecified CLOSED hammer task resume has broken. 2021-04-21 13:19:10 UTC
Red Hat Product Errata RHBA-2021:1312 0 None None None 2021-04-21 14:48:29 UTC

Description Suraj Patil 2020-12-15 09:43:22 UTC
Description of problem:
foreman-maintain health check --label foreman-tasks-not-paused fails with the below 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.8. 

How reproducible:
Run one of the below commands. 

# foreman-maintain health check --label foreman-tasks-not-paused 
OR
# foreman-maintain upgrade check

Actual results:
The command fails with error - "Please provide at least one of search or task_ids parameters in the request"

Expected results:
It should try to resume all the paused tasks. 

Additional info:
Related Bugzilla - https://bugzilla.redhat.com/show_bug.cgi?id=1895324

Comment 1 Suraj Patil 2020-12-15 09:51:55 UTC
Created redmine issue https://projects.theforeman.org/issues/31512 from this bug

Comment 2 Bryan Kearney 2020-12-17 15:10:00 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/31512 has been resolved.

Comment 3 Gaurav Talreja 2021-01-15 12:42:54 UTC
Verified.

Tested on Satellite 6.9.0 Snap 9.
Version: rubygem-foreman_maintain-0.7.4-1.el7sat.noarch

Setup:
1. Have tasks with `state=paused` and `result=error`, Here I published a CV with few repos, and canceled it from UI, which results in the paused task.

Steps:
1. # hammer task list --search state=paused
-------------------------------------|----------------------------------------------------------------------------------|--------|--------|---------------------|----------|-------|--------------------------------------------
ID                                   | ACTION                                                                           | STATE  | RESULT | STARTED AT          | ENDED AT | OWNER | TASK ERRORS
-------------------------------------|----------------------------------------------------------------------------------|--------|--------|---------------------|----------|-------|--------------------------------------------
4728cba4-8531-4a08-98ec-6ff8193db52f | Publish content_view {"text"=>"content view 'test_cv'", "link"=>"/content_vie... | paused | error  | 2021/01/15 12:12:04 |          | admin | Task canceled, Task canceled, Task canceled
-------------------------------------|----------------------------------------------------------------------------------|--------|--------|---------------------|----------|-------|--------------------------------------------


2. # foreman-maintain health check --label foreman-tasks-not-paused
Running ForemanMaintain::Scenario::FilteredScenario
================================================================================
Check for paused tasks:                                               [FAIL]
There are currently 1 paused tasks in the system
--------------------------------------------------------------------------------
There are multiple steps to proceed:
1) Resume paused tasks
2) Delete paused tasks
3) Investigate the tasks via UI
Select step to continue, [n(next)] 1
Resume paused tasks:
| Waiting 30 seconds for resumed tasks to start.                      [OK]
Total tasks found paused in error state: 50
Total tasks resumed:                     1
Resumed tasks:
 1) Task identifier: 4728cba4-8531-4a08-98ec-6ff8193db52f
    Task action:     Publish
    Task errors:     Task canceled, Task canceled, Task canceled
Total tasks failed to resume:            0
Failed tasks:

Total tasks skipped:                     49
Skipped tasks:
 1) Task identifier: 9818a1ae-b7dd-41c9-af27-90e03ff2564e
    Task action:     ForemanInventoryUpload::Async::GenerateAllReportsJob
 .
 .
 .
 49)Task identifier: d2f88925-abf6-4c5a-b7a6-99c991d32c17
    Task action:     Create RSS notifications
--------------------------------------------------------------------------------
Rerunning the check after fix procedure
Check for paused tasks:                                               [OK]
--------------------------------------------------------------------------------


Observation:
The above check was able to resume a paused task successfully, and the task of CV publish completed.

Comment 6 errata-xmlrpc 2021-04-21 14:48:24 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 (Satellite 6.9 Satellite Maintenance 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/RHBA-2021:1312


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