Bug 1143987

Summary: [RFE] Hammer task missing info subcommand
Product: Red Hat Satellite Reporter: Peter Vreman <peter.vreman>
Component: Tasks PluginAssignee: Ivan Necas <inecas>
Status: CLOSED ERRATA QA Contact: Nikhil Kathole <nkathole>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.0.4CC: aruzicka, bkearney, inecas, nkathole, pcreech
Target Milestone: 6.5.0Keywords: FutureFeature, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/9165
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-14 12:36:15 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: 1122832    

Description Peter Vreman 2014-09-18 11:59:30 UTC
Description of problem:
The hammer task has only 1 action progress. This is inconsistent with the other commands that have list, info, update.
Especially the list is a missing feature, because you cannot retrieve a list of possible ID / names of the tasks that are running or were stopped.

See below the inconsistency of the subcommand compared to sync-plan:

# hammer task --help
[Foreman] username:
[Foreman] password for :
Usage:
    hammer task [OPTIONS] SUBCOMMAND [ARG] ...

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

Subcommands:
    progress                      Show the progress of the task



# hammer sync-plan --help
[Foreman] username:
[Foreman] password for :
Usage:
    hammer sync-plan [OPTIONS] SUBCOMMAND [ARG] ...

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

Subcommands:
    create                        Create a sync plan
    delete                        Destroy a sync plan
    info                          Show a sync plan
    list                          List sync plans
    update                        Update a sync plan




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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:
hammer task have also list, info subcommands to be consistent.
hammer task list to list tasks, optionally with a filter on running,stopped,paused and maybe time limited.


Additional info:

Comment 1 RHEL Program Management 2014-09-18 12:03:27 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 3 Bryan Kearney 2015-01-29 16:28:50 UTC
Created redmine issue http://projects.theforeman.org/issues/9165 from this bug

Comment 5 Bryan Kearney 2015-08-25 18:07:51 UTC
Upstream bug component is Tasks Plugin

Comment 6 Bryan Kearney 2016-07-08 20:28:23 UTC
Per 6.3 planning, moving out non acked bugs to the backlog

Comment 8 Adam Ruzicka 2016-10-05 13:05:44 UTC
# hammer task --help
Usage:
    hammer task [OPTIONS] SUBCOMMAND [ARG] ...

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

Subcommands:
 list                          List tasks
 progress                      Show the progress of the task
 resume                        Resume all tasks paused in error state

Options:
 -h, --help                    print help


>> hammer task list to list tasks, optionally with a filter on  running,stopped,paused and maybe time limited.
# hammer task list --help
Usage:
    hammer task list [OPTIONS]

Options:
 --by BY                       Field to sort the results on
 --order ORDER                 Sort field and order, e.g. 'name DESC'
 --page PAGE                   Page number, starting at 1
 --per-page PER_PAGE           Number of results per page to return
 --search SEARCH               Search string
 -h, --help                    print help


hammer task got the list and resume subcommands, info subcommand is still missing

Comment 11 Satellite Program 2018-06-06 08:07:24 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/9165 has been resolved.

Comment 14 Nikhil Kathole 2018-12-12 10:36:27 UTC
VERIFIED

Version tested:
Satellite 6.5 snap 7

# hammer task -h
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

Options:
 -h, --help                    Print help

# hammer task info -h
Usage:
    hammer task info [OPTIONS]

Options:
 --id ID                           UUID of the task
 --location-id LOCATION_ID         Scope by locations
 --organization-id ORGANIZATION_ID Scope by organizations
 -h, --help                        Print help


# hammer task info --id 87b21448-78a2-4dd4-9deb-948941e0e557
ID:          87b21448-78a2-4dd4-9deb-948941e0e557
Action:      Enable repository {"text"=>"repository 'Red Hat Satellite Maintenance 6 for RHEL 7 Server RPMs x86_64'", "link"=>nil} product {"text"=>"product 'Red Hat Enterprise Linux Server'", "link"=>"/products/1/"} organization {"text"=>"organization 'Default Organization'", "link"=>"/organizations/1/edit"}
State:       stopped
Result:      success
Started at:  2018/12/07 17:09:03
Ended at:    2018/12/07 17:09:05
Owner:       admin
Task errors:

Comment 15 Bryan Kearney 2019-03-08 14:46:40 UTC
test1

Comment 17 errata-xmlrpc 2019-05-14 12:36:15 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/RHSA-2019:1222

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