Bug 1250610
| Summary: | hammer activation key product-content does not filter content based on organization | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | sthirugn <sthirugn> |
| Component: | Hammer | Assignee: | Zach Huntington-Meath <zhunting> |
| Status: | CLOSED ERRATA | QA Contact: | sthirugn <sthirugn> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.1.0 | CC: | bbuckingham, bkearney, cwelton, ehelms, sthirugn, tomckay |
| Target Milestone: | Unspecified | Keywords: | Triaged |
| Target Release: | Unused | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | http://projects.theforeman.org/issues/14043 | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-07-27 11:00:05 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: | 1324884 | ||
| Bug Blocks: | 1317679 | ||
|
Description
sthirugn@redhat.com
2015-08-05 14:41:24 UTC
Created redmine issue http://projects.theforeman.org/issues/14043 from this bug I have tested this with two organizations, and found that if searched with an activation key it only brings back the product content for that activation key and organization. Since an activation key implicitly belongs to one organization it seems to follow that giving it an organization to filter it with as well seems unnecessary. Please let me know what you think, thanks! Originally I had tested this issue with non-redhat products. I discovered that after enabling Red Hat Repositories and subscribing them to an activation-key they can provide the same content. This gives the appearance of duplicates showing up in calls for an activation-keys product content. I will fix this issue, and then it should be working as intended. The issue with duplicate content showing up will no longer occur. As stated before there is no need to filter by organization-id as an Activation-key is unique to an organization. I looked into removing it as an option in hammer but it is used by activation-key product-content --name as a way of knowing which activation-key id to use when making a call to the API. I discussed this with some team mates and we decided that because it is a quirk with Hammer and not Katello the API should not be changed either. Moving to POST since upstream bug http://projects.theforeman.org/issues/14043 has been closed Failed in Satellite-6.2-beta-snap-5.1. The activation keys below are from different org and enabled with different manifests, RH repositories. Notice that they are listing the same RH repos. Custom products are filtered correctly per the activation key/org. hammer> activation-key product-content --id=1 --------------|-----------------------------------------------|------|-----|---------|-----------------------------------------------|--------- ID | NAME | TYPE | URL | GPG KEY | LABEL | ENABLED? --------------|-----------------------------------------------|------|-----|---------|-----------------------------------------------|--------- 2455 | Red Hat Enterprise Linux 7 Server (Kickstart) | | | | rhel-7-server-kickstart | 1 2456 | Red Hat Enterprise Linux 7 Server (RPMs) | | | | rhel-7-server-rpms | default 1458779349329 | rhel7sat6tools | | | | Default_Organization_sat6tools_rhel7sat6tools | default --------------|-----------------------------------------------|------|-----|---------|-----------------------------------------------|--------- hammer> activation-key list --or --order --organization --organization-id --organization-label hammer> activation-key list --organization-id=3 ---|-------------|----------------|-----------------------|----------------- ID | NAME | HOST LIMIT | LIFECYCLE ENVIRONMENT | CONTENT VIEW ---|-------------|----------------|-----------------------|----------------- 2 | sthirugn_ak | 0 of Unlimited | Library | test_sthirugn_cv ---|-------------|----------------|-----------------------|----------------- hammer> hammer> activation-key product-content --id=2 --------------|-----------------------------------------------|------|-----|---------|---------------------------------|--------- ID | NAME | TYPE | URL | GPG KEY | LABEL | ENABLED? --------------|-----------------------------------------------|------|-----|---------|---------------------------------|--------- 2455 | Red Hat Enterprise Linux 7 Server (Kickstart) | | | | rhel-7-server-kickstart | default 2456 | Red Hat Enterprise Linux 7 Server (RPMs) | | | | rhel-7-server-rpms | default 1458848295245 | testrepo1 | | | | sthirugn_testproduct1_testrepo1 | default --------------|-----------------------------------------------|------|-----|---------|---------------------------------|--------- I think that I have fixed the problem causing this error and the PR has been merged. Marking as a blocker+ as this commit fixes bug #1317679, which is a blocker itself. This will assure that both, perhaps subtly different behaviors, are verified. QE NOTES: Test both this bug and bug #1317679 at the same time. Still broken. Confirmed fixed Failed in satellite-6.2.0-6.2.beta.el7sat.noarch due to the following error: hammer> activation-key product-content --id=1 undefined method `map' for nil:NilClass A separate bug is written as well - https://bugzilla.redhat.com/show_bug.cgi?id=1324884 This new part of the bug was fixed last night. https://github.com/Katello/katello/pull/5945 Verified in satellite-6.2.0-7.0.beta.el7sat.noarch hammer> activation-key product-content --id=1 --------------|-----------------------------------------------|------|-----|---- ID | NAME | TYPE | URL | GPG KEY | LABEL | ENABLED? --------------|-----------------------------------------------|------|-----|---- 1460390504117 | sat6toolsrepo | | | | Default_Organization_sat6tools_sat6toolsrepo | default 2455 | Red Hat Enterprise Linux 7 Server (Kickstart) | | | | rhel-7-server-kickstart | 1 2456 | Red Hat Enterprise Linux 7 Server (RPMs) | | | | rhel-7-server-rpms | default hammer> activation-key product-content --id=2 --------------|----------------------------------------------------------------- ID | NAME | TYPE | URL | GPG KEY | LABEL | ENABLED? --------------|----------------------------------------------------------------- 3815 | Red Hat Virt V2V Tool for RHEL 7 (RPMs) | | | | rhel-7-server-v2vwin-1-rpms | default 2386 | Red Hat Virt V2V Tool for RHEL 6 (RPMs) | | | | rhel-6-server-v2vwin-1-rpms | default 4539 | Red Hat OpenStack Tools 7.0 for Red Hat Enterprise Linux 7 Server (RPMs) | | | | rhel-7-server-openstack-7.0-tools-rpms | default 1430 | Red Hat Subscription Asset Manager (for RHEL 6 Server) (RPMs) | | | | rhel-6-server-sam-rpms | default 1460476153103 | testorg_customproduct_customrepo | | | | testorg_testorg_customproduct_testorg_customproduct_customrepo | default 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 |