Bug 1506243

Summary: No count method defined for state stopped/planning/pending/scheduled
Product: Red Hat Satellite Reporter: Nikhil Kathole <nkathole>
Component: Satellite MaintainAssignee: Anurag Patel <apatel>
Status: CLOSED NOTABUG QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.3.0CC: apatel, bbuckingham, inecas, kgaikwad
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-04-03 12:16:57 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-10-25 13:28:31 UTC
Description of problem: We were trying to run foreman-tasks-fetch-tasks-status with foreman-tasks-fetch-tasks-status. But for state stopped/planning/pending/scheduled (states other than pending/running), it shows error in foreman-maintain.log as "No count method defined for state".


Version-Release number of selected component (if applicable): foreman-maintain snap 3

 # rpm -q rubygem-foreman_maintain
rubygem-foreman_maintain-0.0.10-1.el7sat.noarch


How reproducible:always


Steps to Reproduce:
1.# foreman-maintain advanced procedure  run foreman-tasks-fetch-tasks-status --state stopped

Actual results:

# foreman-maintain advanced procedure  run foreman-tasks-fetch-tasks-status --state stopped
Running ForemanMaintain::Scenario
================================================================================
Fetch tasks status and wait till they finish:
/ Try checking status of stopped task(s)                              [OK]
--------------------------------------------------------------------------------

But foreman-maintain.log shows

I, [2017-10-25 09:20:27-0400 #25041]  INFO -- : Running foreman-maintain command with arguments [["advanced", "procedure", "run", "foreman-tasks-fetch-tasks-status", "--state", "stopped"]]
E, [2017-10-25 09:20:27-0400 #25041] ERROR -- : No count method defined for state stopped.
E, [2017-10-25 09:20:27-0400 #25041] ERROR -- : Unsupported for state stopped.
I, [2017-10-25 09:20:27-0400 #25041]  INFO -- : foreman-maintain command finished with

Expected results:foreman-tasks-fetch-tasks-status should work for all tasks


Additional info: foreman-maintain advanced procedure  run foreman-tasks-fetch-tasks-status --state pending/running works.

Comment 1 Brad Buckingham 2017-10-27 17:09:10 UTC
Anurag, what are your thoughts on this one?  Should it be targeted to 0.5 or 1.0?  Thanks!

Comment 3 Anurag Patel 2018-04-03 12:16:57 UTC
We are going to hide foreman-tasks-fetch-tasks-status procedure ( http://projects.theforeman.org/issues/23102 ). So, marking this as NOTABUG.