Bug 1496384

Summary: check for foreman-tasks-not-running is not working
Product: Red Hat Satellite Reporter: Nikhil Kathole <nkathole>
Component: Satellite MaintainAssignee: Kavita <kgaikwad>
Status: CLOSED ERRATA QA Contact: Nikhil Kathole <nkathole>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.3.0CC: apatel, bbuckingham, bkearney, inecas, kgaikwad, mmccune, sabnave
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-19 17:22:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1496794    

Description Nikhil Kathole 2017-09-27 08:58:45 UTC
Description of problem: we were trying to fail foreman-tasks-not-running health check and thus run a task from UI.But found that foreman-tasks-not-running health check still pass giving result "Check for running tasks:                                              [OK]".


Version-Release number of selected component (if applicable): Foreman-maintain 2.0


How reproducible: always


Steps to Reproduce:
1. Run a task from UI (Make sure it is in running state)
2.# foreman-maintain health check --label foreman-tasks-not-running

Actual results:
Check will pass and foreman-maintain.log shows

D, [2017-09-27 04:51:33-0400 #84954] DEBUG -- : Running command rpm -q satellite with stdin nil
D, [2017-09-27 04:51:33-0400 #84954] DEBUG -- : output of the command:
 satellite-6.3.0-18.0.beta.el7sat.noarch
D, [2017-09-27 04:51:33-0400 #84954] DEBUG -- : Running command rpm -q 'foreman' --queryformat="%{VERSION}" with stdin nil
D, [2017-09-27 04:51:33-0400 #84954] DEBUG -- : output of the command:
 1.15.4.1
D, [2017-09-27 04:51:33-0400 #84954] DEBUG -- : Running command rpm -q 'ruby193-rubygem-foreman-tasks' --queryformat="%{VERSION}" with stdin nil
D, [2017-09-27 04:51:33-0400 #84954] DEBUG -- : output of the command:
 package ruby193-rubygem-foreman-tasks is not installed
D, [2017-09-27 04:51:33-0400 #84954] DEBUG -- : Running command rpm -q 'tfm-rubygem-foreman-tasks' --queryformat="%{VERSION}" with stdin nil
D, [2017-09-27 04:51:33-0400 #84954] DEBUG -- : output of the command:
 0.9.4
D, [2017-09-27 04:51:33-0400 #84954] DEBUG -- : Running command rpm -q satellite with stdin nil
D, [2017-09-27 04:51:33-0400 #84954] DEBUG -- : output of the command:
 satellite-6.3.0-18.0.beta.el7sat.noarch
I, [2017-09-27 04:51:33-0400 #84954]  INFO -- : Running foreman-maintain command with arguments [["health", "check", "--label", "foreman-tasks-not-running"]]
I, [2017-09-27 04:51:33-0400 #84954]  INFO -- : foreman-maintain command finished with

Expected results:
When task is in running state, health check for foreman-tasks-not-running should fail.

Additional info:

Comment 1 Satellite Program 2017-10-17 12:24:23 UTC
Upstream bug assigned to kgaikwad

Comment 2 Satellite Program 2017-10-18 16:24:52 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/21118 has been resolved.

Comment 3 Nikhil Kathole 2017-12-15 11:39:50 UTC
VERIFIED

Version Tested:
# rpm -q rubygem-foreman_maintain
rubygem-foreman_maintain-0.1.1-1.el7sat.noarch

# foreman-maintain health check --label foreman-tasks-not-running
Running ForemanMaintain::Scenario::FilteredScenario
================================================================================
Check for running tasks:                                              [FAIL]
There are 2 active task(s) in the system.
Please wait for these to complete or cancel them from the Monitor tab.
--------------------------------------------------------------------------------
There are multiple steps to proceed:
1) Fetch tasks status and wait till they finish
2) Investigate the tasks via UI
Select step to continue, [n(next), q(quit)]

Comment 7 errata-xmlrpc 2018-02-19 17:22:26 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, 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-2018:0330

Comment 8 Red Hat Bugzilla 2023-09-14 04:09:04 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days