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 1542675 - BUG - hammer command asking for parameter when should not
Summary: BUG - hammer command asking for parameter when should not
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hammer - Content
Version: 6.2.13
Hardware: All
OS: All
medium
medium
Target Milestone: 6.7.0
Assignee: Partha Aji
QA Contact: Roman Plevka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-02-06 19:25 UTC by Waldirio M Pinheiro
Modified: 2021-03-11 17:07 UTC (History)
4 users (show)

Fixed In Version: tfm-rubygem-hammer_cli_katello-0.20.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-14 15:54:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 28224 0 Normal Closed hammer host errata list - Unrecognised option '--environment' 2020-12-22 11:25:46 UTC
Red Hat Product Errata RHBA-2020:1455 0 None None None 2020-04-14 15:54:23 UTC

Description Waldirio M Pinheiro 2018-02-06 19:25:55 UTC
Description of problem:
Customer trying to collect errata information via hammer. Command should works fine but ask for one parameter that is not possible to pass/inform.

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

How reproducible:
100%

Steps to Reproduce:
1. Execute hammer command querying by name *fail*
2. Execute hammer command querying by id *works as expected*

Actual results:
when querying by name fail

Expected results:
when querying by name retrieve the correct information, as happen when doing the query using id

Additional info:

Comment 1 Waldirio M Pinheiro 2018-02-06 19:28:19 UTC
Hi all


// All environment available. Let's collect here the id
---
[root@wallsat6 ~]# hammer -p redhat environment list
---|------------
ID | NAME       
---|------------
2  | example_env
1  | production 
---|------------
[root@wallsat6 ~]# 
---

// The Content View available, here we will collect id from Default *1* and cv_rhel73_10_2017 *7*
---
[root@wallsat6 ~]# hammer -p redhat content-view list --organization ACME
----------------|---------------------------|---------------------------|-----------|---------------
CONTENT VIEW ID | NAME                      | LABEL                     | COMPOSITE | REPOSITORY IDS
----------------|---------------------------|---------------------------|-----------|---------------
1               | Default Organization View | Default_Organization_View |           |               
7               | cv_rhel73_10_2017         | cv_rhel73_10_2017         |           | 2             
2               | cv_rhel73                 | cv_rhel73                 |           | 5, 2          
----------------|---------------------------|---------------------------|-----------|---------------
[root@wallsat6 ~]#
---

// Query using names
---
[root@wallsat6 ~]# hammer -p redhat host errata list --host dhcp-10-12-211-151.hq.gsslab.rdu.redhat.com --content-view cv_rhel73_10_2017 --environment production
Error: Could not find organization. Some search options were missing, please see --help.
[root@wallsat6 ~]# 
---

// Same query using id's
---
[root@wallsat6 ~]# hammer -p redhat host errata list --host dhcp-10-12-211-151.hq.gsslab.rdu.redhat.com --content-view-id 7 --environment-id 1
-------------------------------------|----------------|-------------|-------------------------------------------------------|------------
ID                                   | ERRATUM ID     | TYPE        | TITLE                                                 | INSTALLABLE
-------------------------------------|----------------|-------------|-------------------------------------------------------|------------
9f7b956f-b340-458c-b83a-e1c9153460b9 | RHBA-2017:1301 | bugfix      | libnetfilter_conntrack bug fix and enhancement update |            
8ce49149-cd74-4242-bac5-e20fa04a80da | RHSA-2017:1208 | security    | Important: jasper security update                     |            
6e28fa31-5f1d-476c-8bcb-a36d0d89110a | RHEA-2017:1307 | enhancement | tuned bug fix update                                  |            
67796e1c-0c93-4917-92d2-aef0d9b17f0c | RHEA-2017:1300 | enhancement | device-mapper-multipath enhancement update            |            
5c7429d7-96f1-46d3-a4ea-815775b3648b | RHBA-2017:1604 | bugfix      | chkconfig bug fix update                              |            
5483c4e9-d576-442f-af8b-bd3145460b34 | RHBA-2017:1317 | bugfix      | NetworkManager bug fix update                         |            
4bc84c20-1375-4940-a6d3-8bfa221ab470 | RHBA-2017:1617 | bugfix      | lvm2 bug fix update                                   |            
3d6c1600-3f99-4ff3-822a-47925daa32a1 | RHSA-2017:1365 | security    | Important: nss security and bug fix update            |            
3d59a1c9-2d23-4bf2-8031-d5b9317fcf80 | RHBA-2017:1299 | bugfix      | RDMA bug fix update                                   |            
385e2f4c-259b-4542-baf0-678581e49be3 | RHSA-2017:1574 | security    | Moderate: sudo security update                        |            
33cc26e3-2767-436c-829f-5b116dd4102c | RHBA-2017:1306 | bugfix      | polkit bug fix update                                 |            
2ebd6a7f-10a8-4841-8bd5-10b1cd02a906 | RHSA-2017:1382 | security    | Important: sudo security update                       |            
28c338f6-7ce3-43d7-9a8e-559f198eae63 | RHBA-2017:1611 | bugfix      | python-dmidecode bug fix update                       |            
23e3910b-2bb0-4bf9-9609-324440ae64ee | RHEA-2017:1437 | enhancement | ca-certificates enhancement update                    |            
22fcaf91-65e2-4711-9350-322c16ca7a47 | RHBA-2017:1311 | bugfix      | systemd bug fix update                                |            
21b52f44-c4fb-4d18-b8ef-5825054a23db | RHBA-2017:1607 | bugfix      | xfsprogs bug fix update                               |            
0e0ee774-6930-4759-9b00-b6f0fd683337 | RHBA-2017:1614 | bugfix      | python-rhsm bug fix update                            |            
-------------------------------------|----------------|-------------|-------------------------------------------------------|------------
You have mail in /var/spool/mail/root
[root@wallsat6 ~]# 
---


Best Regards
-- 
Waldirio M Pinheiro | Senior Software Maintenance Engineer

Comment 2 Waldirio M Pinheiro 2018-02-06 19:38:00 UTC
Hi all

To complement

    [root@wallsat6 ~]# hammer -p redhat host errata list --host dhcp-10-12-211-151.hq.gsslab.rdu.redhat.com --content-view cv_rhel73_10_2017
    Error: Could not find organization. Some search options were missing, please see --help.
    [root@wallsat6 ~]# hammer -p redhat host errata list --host dhcp-10-12-211-151.hq.gsslab.rdu.redhat.com --content-view cv_rhel73_10_2017 --help
    Usage:
        hammer host errata list [OPTIONS]
     
    Options:
     --by BY                           Field to sort the results on
     --content-view CONTENT_VIEW_NAME  Content view name to search by
     --content-view-id CONTENT_VIEW_ID content view numeric identifier
     --environment ENVIRONMENT_NAME    Name to search by
     --environment-id ENVIRONMENT_ID    
     --full-results FULL_RESULTS       Whether or not to show all results
                                       One of true/false, yes/no, 1/0.
     --host HOST_NAME                  Name to search by
     --host-id HOST_ID                  
     --order ORDER                     Sort field and order, eg. '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
    [root@wallsat6 ~]#



Best Regards
-- 
Waldirio M Pinheiro | Senior Software Maintenance Engineer

Comment 4 Brad Buckingham 2018-02-20 19:09:58 UTC
The same behavior is observed on Satellite 6.3.  The CLI needs to expose the 'organization' parameters as input to support resolving the command where content view name is provided.


hammer> host errata list --help
Usage:
     host errata list [OPTIONS]

Options:
 --by BY                           Field to sort the results on
 --content-view CONTENT_VIEW_NAME  Content view name to search by
 --content-view-id CONTENT_VIEW_ID content view numeric identifier
 --environment ENVIRONMENT_NAME    Environment name
 --environment-id ENVIRONMENT_ID    
 --full-result FULL_RESULT         Whether or not to show all results
                                   One of true/false, yes/no, 1/0.
 --host HOST_NAME                  Host name
 --host-id HOST_ID                  
 --order ORDER                     Sort field and order, eg. '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> host errata list --host renee-guevarra-73.prov.lan --content-view 'RHEL 7.3 SOE' --environment 'KT_ACME_Production_RHEL_7_3_SOE_13'
Error: Could not find organization. Some search options were missing, please see --help.

hammer> host errata list --host renee-guevarra-73.prov.lan --content-view 'RHEL 7.3 SOE'
Error: Could not find organization. Some search options were missing, please see --help.

Comment 6 Bryan Kearney 2019-09-03 19:07:01 UTC
The Satellite Team is attempting to provide an accurate backlog of bugzilla requests which we feel will be resolved in the next few releases. We do not believe this bugzilla will meet that criteria, and have plans to close it out in 1 month. This is not a reflection on the validity of the request, but a reflection of the many priorities for the product. If you have any concerns about this, feel free to contact Red Hat Technical Support or your account team. If we do not hear from you, we will close this bug out. Thank you.

Comment 7 Bryan Kearney 2019-10-02 16:08:13 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and while we recognize that it is a valid request, we do not expect this to be implemented in the product in the foreseeable future. This is due to other priorities for the product, and not a reflection on the request itself. We are therefore closing this out as WONTFIX. If you have any concerns about this, please do not reopen. Instead, feel free to contact Red Hat Technical Support. Thank you.

Comment 9 Bryan Kearney 2019-11-04 14:34:08 UTC
The Satellite Team is attempting to provide an accurate backlog of bugzilla requests which we feel will be resolved in the next few releases. We do not believe this bugzilla will meet that criteria, and have plans to close it out in 1 month. This is not a reflection on the validity of the request, but a reflection of the many priorities for the product. If you have any concerns about this, feel free to contact Red Hat Technical Support or your account team. If we do not hear from you, we will close this bug out. Thank you.

Comment 10 Partha Aji 2019-11-08 22:27:37 UTC
Connecting redmine issue https://projects.theforeman.org/issues/28224 from this bug

Comment 11 Bryan Kearney 2019-11-11 17:02:49 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/28224 has been resolved.

Comment 12 Roman Plevka 2020-02-27 11:08:23 UTC
VERIFIED
on satellite-6.7.0-5.beta.el7sat.noarch

the organization parameters are now available:

# hammer host errata list --host amber-tumulty.rplevka.com --content-view "25403f59-4f79-4389-8817-7f191936c230" --lifecycle-environment Library --organization-id 1
Error: content_view not found.
[root@dhcp-3-218 ~]# hammer host errata list --host amber-tumulty.rplevka.com --content-view "Default Organization View" --lifecycle-environment Library --organization-id 1
---|------------|------|-------|------------
ID | ERRATUM ID | TYPE | TITLE | INSTALLABLE
---|------------|------|-------|------------

Comment 15 errata-xmlrpc 2020-04-14 15:54:08 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-2020:1455


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