Bug 1283173

Summary: 'puppet-module list' command ignore information about organization
Product: Red Hat Satellite Reporter: Oleksandr Shtaier <oshtaier>
Component: HammerAssignee: Brad Buckingham <bbuckingham>
Status: CLOSED ERRATA QA Contact: Jitendra Yejare <jyejare>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.1.4CC: bbuckingham, dlezzoum, jyejare, kbidarka, omaciel, rochacbruno
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
URL: http://projects.theforeman.org/issues/12651
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 11:18:29 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 Oleksandr Shtaier 2015-11-18 12:13:31 UTC
Description of problem:

Here is description of the command:

>hammer puppet-module list --help
Message
"Usage:
    hammer puppet-module list [OPTIONS]

Options:
...
 --organization ORGANIZATION_NAME                    Organization name to search by
 --organization-id ORGANIZATION_ID                   organization ID
 --organization-label ORGANIZATION_LABEL             Organization label to search by
...
"

It seems these three options do not effect overall flow.
For example:
>hammer -v -u name -p pass --output=csv puppet-module list --organization-id="9999999999"
showed me list of puppet modules that I have in the system, not the error

Same result for:
>hammer -v -u name -p pass --output=csv puppet-module list --organization="MY_NON_EXISTENT_ORGANIZATION"

And similar result for valid data:
>hammer -v -u name -p pass --output=csv puppet-module list --organization-id="1" 

Command returned list of all puppet modules, but not the ones assigned for that specific organization

Version-Release number of selected component (if applicable):
It is not specific for 6.1.4, but behavior was analyzed for that version. The issue exists for a long time in the system

How reproducible:
Always

Steps to Reproduce:
1. Use any commands described above

Actual results:
System *always* show list of *all* unique puppet modules

Expected results:
System should show an error or correct list of puppet modules


Additional info:

Comment 2 Bryan Kearney 2015-12-01 18:30:43 UTC
Created redmine issue http://projects.theforeman.org/issues/12651 from this bug

Comment 3 Brad Buckingham 2015-12-03 15:46:58 UTC
Upstream Katello PR: https://github.com/Katello/katello/pull/5645

Comment 4 Bryan Kearney 2015-12-08 15:05:41 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/12651 has been closed
-------------
Brad Buckingham
Applied in changeset commit:katello|2eb8817e6495591402e7075fb44437a651e42e6a.

Comment 5 Brad Buckingham 2015-12-22 17:20:29 UTC
*** Bug 1269434 has been marked as a duplicate of this bug. ***

Comment 7 Jitendra Yejare 2016-03-22 09:11:37 UTC
Verified this in Satellite 6.2 snap 4.

The issue is no more reproducible.

Steps and Results:

[root@dell-t7400-01 ~]# hammer --output=csv puppet-module list --organization-id="9999999999"
Couldn't find organization '9999999999'

[root@dell-t7400-01 ~]# hammer --output=csv puppet-module list --organization="non existing"
Error: organization not found

[root@dell-t7400-01 ~]# hammer -u admin -p changeme --output=csv puppet-module list --organization-id=1
ID,Name,Author,Version
1,nova,openstack,7.0.0

[root@dell-t7400-01 ~]# hammer -u admin -p changeme --output=csv puppet-module list --organization-id=3
ID,Name,Author,Version
2,openssl,camptocamp,1.6.1

So, changing the state to 'Verified'.

Comment 10 Bryan Kearney 2016-07-27 11:18:29 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-2016:1501

Comment 11 Daniel Lobato Garcia 2017-01-03 07:42:25 UTC
*** Bug 1402767 has been marked as a duplicate of this bug. ***