Bug 1579413

Summary: Hammer: Trying to order an output with --order returns empty output
Product: Red Hat Satellite Reporter: Diogo Henrique <dnunes>
Component: HammerAssignee: Rahul Bajaj <rabajaj>
Status: CLOSED ERRATA QA Contact: vijsingh
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.3.1CC: apatel, bkearney, dhlavacd, egolov, kgaikwad, mhulan, rabajaj
Target Milestone: 6.6.0Keywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: tfm-rubygem-katello-3.10 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-22 19:50:33 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:

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