Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1579413 - Hammer: Trying to order an output with --order returns empty output
Summary: Hammer: Trying to order an output with --order returns empty output
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hammer
Version: 6.3.1
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: 6.6.0
Assignee: Rahul Bajaj
QA Contact: vijsingh
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-17 15:15 UTC by Diogo Henrique
Modified: 2021-06-10 16:12 UTC (History)
7 users (show)

Fixed In Version: tfm-rubygem-katello-3.10
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-10-22 19:50:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 23512 0 None None None 2018-06-22 19:52:31 UTC

Description Diogo Henrique 2018-05-17 15:15:16 UTC
Description of problem:

During the usage of hammer command, some commands ( I've tested some ), returns a perfect output when running without --order parameter, Eg:

hammer> erratum list
-----|----------------|-------------|---------------------------------------------------------------------------------
ID   | ERRATA ID      | TYPE        | TITLE                                                                           
-----|----------------|-------------|---------------------------------------------------------------------------------
3114 | RHBA-2018:1339 | bugfix      | tzdata enhancement update                                                       
3113 | RHSA-2018:1318 | security    | Important: kernel security, bug fix, and enhancement update                     
3107 | RHSA-2018:1278 | security    | Important: java-1.7.0-openjdk security update                                   

If I try to order, by something like type, it returns an empty output table, using the example presented in documentation or some other:

hammer> erratum list --order type
---|-----------|------|------
ID | ERRATA ID | TYPE | TITLE
---|-----------|------|------
hammer> erratum list --order "type"
---|-----------|------|------
ID | ERRATA ID | TYPE | TITLE
---|-----------|------|------
hammer> erratum list --order "type desc"

Documentation Example:
https://access.redhat.com/documentation/en-us/red_hat_satellite/6.3/html-single/hammer_cli_guide/#chap-CLI_Guide-Managing_Content_Life_Cycle

8.1. Inspecting Available Errata
Example 8.1. Filtering Errata


Version-Release number of selected component (if applicable): SAtellite 6.3.1 RHEL 7.5


How reproducible: Always, test to run a command with --order parameter


Steps to Reproduce:
1. Install Satellite
2. Populate Satellite with some data
3. Use hammer with --order parameter

Actual results:

Empty output


Expected results:

Output ordered by arguments provided to --order

Additional info:

Comment 1 Kavita 2018-06-07 13:03:35 UTC
Created redmine issue http://projects.theforeman.org/issues/23847 from this bug

Comment 2 Bryan Kearney 2019-02-18 15:02:01 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/23512 has been resolved.

Comment 3 vijsingh 2019-05-20 12:50:59 UTC
ON_QA Verified.

@Satellite 6.6.0 snap 3.0

Steps:

  1. Synced some repos to populate the errata.

Observation:

 - Able to sort the using '--order' 'type/id/title'

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hammer> erratum list 
---|----------------|-------------|-----------------------------------------------------
ID | ERRATA ID      | TYPE        | TITLE                                               
---|----------------|-------------|-----------------------------------------------------
11 | RHBA-2019:1221 | bugfix      | Satellite 6.5 Satellite Maintenance Release         
1  | RHSA-2019:1223 | security    | Important: Red Hat Satellite Tools security update  
10 | RHBA-2019:0904 | bugfix      | Satellite Maintenance 6.4.3 Async Bug Fix Update    
6  | RHEA-2019:0344 | enhancement | Satellite Maintenance 6.4.2 Async Enhancement Update
12 | RHBA-2018:2926 | bugfix      | Red Hat Satellite 6 Maintenance 6.4 Release         
7  | RHBA-2018:2529 | bugfix      | Satellite Maintenance Async bug fix update          
8  | RHBA-2018:1138 | bugfix      | Satellite Maintenance Async bug fix update          
4  | RHBA-2018:0633 | bugfix      | Satellite Maintenance 1.1 Async bug fix update      
3  | RHBA-2018:0330 | bugfix      | Satellite Maintenance bug fix update                
2  | RHBA-2018:0033 | bugfix      | Satellite Maintenance bug fix update                
5  | RHEA-2017:3192 | enhancement | Satellite Maintenance async errata                  
9  | RHEA-2017:3054 | enhancement | Satellite 6 Maintenance Tooling Beta Release        
---|----------------|-------------|-----------------------------------------------------

hammer> erratum list --order 'type desc'
---|----------------|-------------|-----------------------------------------------------
ID | ERRATA ID      | TYPE        | TITLE                                               
---|----------------|-------------|-----------------------------------------------------
1  | RHSA-2019:1223 | security    | Important: Red Hat Satellite Tools security update  
9  | RHEA-2017:3054 | enhancement | Satellite 6 Maintenance Tooling Beta Release        
6  | RHEA-2019:0344 | enhancement | Satellite Maintenance 6.4.2 Async Enhancement Update
5  | RHEA-2017:3192 | enhancement | Satellite Maintenance async errata                  
12 | RHBA-2018:2926 | bugfix      | Red Hat Satellite 6 Maintenance 6.4 Release         
11 | RHBA-2019:1221 | bugfix      | Satellite 6.5 Satellite Maintenance Release         
10 | RHBA-2019:0904 | bugfix      | Satellite Maintenance 6.4.3 Async Bug Fix Update    
8  | RHBA-2018:1138 | bugfix      | Satellite Maintenance Async bug fix update          
7  | RHBA-2018:2529 | bugfix      | Satellite Maintenance Async bug fix update          
4  | RHBA-2018:0633 | bugfix      | Satellite Maintenance 1.1 Async bug fix update      
3  | RHBA-2018:0330 | bugfix      | Satellite Maintenance bug fix update                
2  | RHBA-2018:0033 | bugfix      | Satellite Maintenance bug fix update                
---|----------------|-------------|-----------------------------------------------------
hammer> erratum list --order 'type esc'
---|----------------|-------------|-----------------------------------------------------
ID | ERRATA ID      | TYPE        | TITLE                                               
---|----------------|-------------|-----------------------------------------------------
12 | RHBA-2018:2926 | bugfix      | Red Hat Satellite 6 Maintenance 6.4 Release         
11 | RHBA-2019:1221 | bugfix      | Satellite 6.5 Satellite Maintenance Release         
10 | RHBA-2019:0904 | bugfix      | Satellite Maintenance 6.4.3 Async Bug Fix Update    
8  | RHBA-2018:1138 | bugfix      | Satellite Maintenance Async bug fix update          
7  | RHBA-2018:2529 | bugfix      | Satellite Maintenance Async bug fix update          
4  | RHBA-2018:0633 | bugfix      | Satellite Maintenance 1.1 Async bug fix update      
3  | RHBA-2018:0330 | bugfix      | Satellite Maintenance bug fix update                
2  | RHBA-2018:0033 | bugfix      | Satellite Maintenance bug fix update                
9  | RHEA-2017:3054 | enhancement | Satellite 6 Maintenance Tooling Beta Release        
6  | RHEA-2019:0344 | enhancement | Satellite Maintenance 6.4.2 Async Enhancement Update
5  | RHEA-2017:3192 | enhancement | Satellite Maintenance async errata                  
1  | RHSA-2019:1223 | security    | Important: Red Hat Satellite Tools security update  
---|----------------|-------------|-----------------------------------------------------

hammer> erratum list --order type
---|----------------|-------------|-----------------------------------------------------
ID | ERRATA ID      | TYPE        | TITLE                                               
---|----------------|-------------|-----------------------------------------------------
12 | RHBA-2018:2926 | bugfix      | Red Hat Satellite 6 Maintenance 6.4 Release         
11 | RHBA-2019:1221 | bugfix      | Satellite 6.5 Satellite Maintenance Release         
10 | RHBA-2019:0904 | bugfix      | Satellite Maintenance 6.4.3 Async Bug Fix Update    
8  | RHBA-2018:1138 | bugfix      | Satellite Maintenance Async bug fix update          
7  | RHBA-2018:2529 | bugfix      | Satellite Maintenance Async bug fix update          
4  | RHBA-2018:0633 | bugfix      | Satellite Maintenance 1.1 Async bug fix update      
3  | RHBA-2018:0330 | bugfix      | Satellite Maintenance bug fix update                
2  | RHBA-2018:0033 | bugfix      | Satellite Maintenance bug fix update                
9  | RHEA-2017:3054 | enhancement | Satellite 6 Maintenance Tooling Beta Release        
6  | RHEA-2019:0344 | enhancement | Satellite Maintenance 6.4.2 Async Enhancement Update
5  | RHEA-2017:3192 | enhancement | Satellite Maintenance async errata                  
1  | RHSA-2019:1223 | security    | Important: Red Hat Satellite Tools security update  
---|----------------|-------------|-----------------------------------------------------
hammer> erratum list --order title
---|----------------|-------------|-----------------------------------------------------
ID | ERRATA ID      | TYPE        | TITLE                                               
---|----------------|-------------|-----------------------------------------------------
1  | RHSA-2019:1223 | security    | Important: Red Hat Satellite Tools security update  
12 | RHBA-2018:2926 | bugfix      | Red Hat Satellite 6 Maintenance 6.4 Release         
11 | RHBA-2019:1221 | bugfix      | Satellite 6.5 Satellite Maintenance Release         
9  | RHEA-2017:3054 | enhancement | Satellite 6 Maintenance Tooling Beta Release        
4  | RHBA-2018:0633 | bugfix      | Satellite Maintenance 1.1 Async bug fix update      
6  | RHEA-2019:0344 | enhancement | Satellite Maintenance 6.4.2 Async Enhancement Update
10 | RHBA-2019:0904 | bugfix      | Satellite Maintenance 6.4.3 Async Bug Fix Update    
8  | RHBA-2018:1138 | bugfix      | Satellite Maintenance Async bug fix update          
7  | RHBA-2018:2529 | bugfix      | Satellite Maintenance Async bug fix update          
5  | RHEA-2017:3192 | enhancement | Satellite Maintenance async errata                  
3  | RHBA-2018:0330 | bugfix      | Satellite Maintenance bug fix update                
2  | RHBA-2018:0033 | bugfix      | Satellite Maintenance bug fix update                
---|----------------|-------------|-----------------------------------------------------
hammer> 

hammer> erratum list --order 'id DESC'
---|----------------|-------------|-----------------------------------------------------
ID | ERRATA ID      | TYPE        | TITLE                                               
---|----------------|-------------|-----------------------------------------------------
1  | RHSA-2019:1223 | security    | Important: Red Hat Satellite Tools security update  
6  | RHEA-2019:0344 | enhancement | Satellite Maintenance 6.4.2 Async Enhancement Update
5  | RHEA-2017:3192 | enhancement | Satellite Maintenance async errata                  
9  | RHEA-2017:3054 | enhancement | Satellite 6 Maintenance Tooling Beta Release        
11 | RHBA-2019:1221 | bugfix      | Satellite 6.5 Satellite Maintenance Release         
10 | RHBA-2019:0904 | bugfix      | Satellite Maintenance 6.4.3 Async Bug Fix Update    
12 | RHBA-2018:2926 | bugfix      | Red Hat Satellite 6 Maintenance 6.4 Release         
7  | RHBA-2018:2529 | bugfix      | Satellite Maintenance Async bug fix update          
8  | RHBA-2018:1138 | bugfix      | Satellite Maintenance Async bug fix update          
4  | RHBA-2018:0633 | bugfix      | Satellite Maintenance 1.1 Async bug fix update      
3  | RHBA-2018:0330 | bugfix      | Satellite Maintenance bug fix update                
2  | RHBA-2018:0033 | bugfix      | Satellite Maintenance bug fix update                
---|----------------|-------------|-----------------------------------------------------


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Comment 5 Bryan Kearney 2019-10-22 19:50:33 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:3172


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