Bug 1324884

Summary: hammer activationkey product-content command failed
Product: Red Hat Satellite Reporter: sthirugn <sthirugn>
Component: Content ManagementAssignee: Brad Buckingham <bbuckingham>
Status: CLOSED ERRATA QA Contact: sthirugn <sthirugn>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: bbuckingham
Target Milestone: UnspecifiedKeywords: Regression, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/14532
Whiteboard:
Fixed In Version: rubygem-katello-3.0.0.16-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 09:31:07 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:    
Bug Blocks: 1250610    
Attachments:
Description Flags
production.log none

Description sthirugn@redhat.com 2016-04-07 13:42:32 UTC
Created attachment 1144746 [details]
production.log

Description of problem:
hammer activationkey product-content command failed

Version-Release number of selected component (if applicable):
satellite-6.2.0-6.2.beta.el7sat.noarch

How reproducible:
Always

Steps to Reproduce:
hammer> activation-key product-content --id=1
undefined method `map' for nil:NilClass


Actual results:
error as shown above

Expected results:
No error and product contents listed

Additional info:

Comment 1 sthirugn@redhat.com 2016-04-07 13:43:49 UTC
This is a regression and this seems to have broken in the recent builds (It worked fine 2 weeks back - https://bugzilla.redhat.com/show_bug.cgi?id=1250610#c7)

Comment 3 Brad Buckingham 2016-04-07 17:37:46 UTC
It appears that this error may only occur, if the activation key does not have any subscriptions attached to it.

Comment 4 Brad Buckingham 2016-04-07 17:38:15 UTC
Created redmine issue http://projects.theforeman.org/issues/14532 from this bug

Comment 5 Bryan Kearney 2016-04-07 18:11:03 UTC
Upstream bug component is Content Management

Comment 6 Brad Buckingham 2016-04-07 18:25:38 UTC
Upstream Katello PR: 
https://github.com/Katello/katello/pull/5945

Comment 7 Bryan Kearney 2016-04-07 22:10:56 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/14532 has been closed
-------------
Brad Buckingham
Applied in changeset commit:katello|825eb8cb06d94ed6bf3f629dc62bcd3415703e74.

Comment 8 sthirugn@redhat.com 2016-04-14 14:11:26 UTC
Verified in satellite-6.2.0-8.0.beta.el7sat.noarch

# hammer -u admin -p changeme activation-key product-content --id=1
--------------|-----------------------------------------------|------|-----|---------|----------------------------------------------|---------
ID            | NAME                                          | TYPE | URL | GPG KEY | LABEL                                        | ENABLED?
--------------|-----------------------------------------------|------|-----|---------|----------------------------------------------|---------
1460641048864 | sat6toolsrepo                                 |      |     |         | Default_Organization_sat6tools_sat6toolsrepo | default 
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 
--------------|-----------------------------------------------|------|-----|---------|----------------------------------------------|---------

Comment 10 errata-xmlrpc 2016-07-27 09:31:07 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