Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1364866

Summary: Custom Product created via hammer does not get correctly associated with the Custom Subscription
Product: Red Hat Satellite Reporter: jalviso <jalviso>
Component: Subscription ManagementAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Brad Buckingham <bbuckingham>
Severity: medium Docs Contact:
Priority: high    
Version: 6.2.0CC: bbuckingham, bkearney, jalviso, jcallaha, jentrena, xdmoon
Target Milestone: UnspecifiedKeywords: PrioBumpGSS, Triaged
Target Release: Unused   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 16:54:17 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: 1479962    

Comment 9 Brad Buckingham 2017-08-30 13:13:45 UTC
Verified with Satellite 6.3 SNAP 13: satellite-6.3.0-16.0.beta.el7sat.noarch, tfm-rubygem-katello-3.4.4-1.el7sat.noarch

Ran through the scenario provided and confirmed that the custom repository does have product-content associated with it in the activation key.

hammer> product create --organization "Default Organization" --name "VMware-tools"
Product created

hammer> repository create --organization "Default Organization" --product "VMware-tools" --content-type yum --url "http://packages.vmware.com/packages/rhel7/x86_64/" --name "vmtools"
Repository created

hammer> repository synchronize --organization "Default Organization" --product "VMware-tools" --name "vmtools"
[.................................................................................................................] [100%]
New packages: 3 (171 KB).

hammer> product list --organization "Default Organization"
----|----------------------------------------------------------------------------------|-------------|----------------------|--------------|------------------
ID  | NAME                                                                             | DESCRIPTION | ORGANIZATION         | REPOSITORIES | SYNC STATE       
----|----------------------------------------------------------------------------------|-------------|----------------------|--------------|------------------
204 | VMware-tools                                                                     |             | Default Organization | 1            | Syncing Complete.
----|----------------------------------------------------------------------------------|-------------|----------------------|--------------|------------------

hammer> subscription list --organization "Default Organization"
---|----------------------------------|-----------------------------------------|----------|----------|---------|--------------|---------------------|-----------|---------
ID | UUID                             | NAME                                    | TYPE     | CONTRACT | ACCOUNT | SUPPORT      | END DATE            | QUANTITY  | CONSUMED
---|----------------------------------|-----------------------------------------|----------|----------|---------|--------------|---------------------|-----------|---------
7  | 4028f9a35e2fcac5015e333758870002 | VMware-tools                            | Physical |          |         |              | 2047/08/23 12:56:58 | Unlimited | 0       
---|----------------------------------|-----------------------------------------|----------|----------|---------|--------------|---------------------|-----------|---------


hammer> activation-key create --organization "Default Organization" --name "VMware-tools" --content-view "Default Organization View" --lifecycle-environment Library
Activation key created

hammer> activation-key add-subscription --organization "Default Organization" --name "VMware-tools" --subscription-id 7
Subscription added to activation key

hammer> activation-key product-content --organization "Default Organization" --name "VMware-tools"
--------------|---------|------|-----|---------|-------------------------------------------|----------|---------
ID            | NAME    | TYPE | URL | GPG KEY | LABEL                                     | ENABLED? | OVERRIDE
--------------|---------|------|-----|---------|-------------------------------------------|----------|---------
1504097894685 | vmtools |      |     |         | Default_Organization_VMware-tools_vmtools | yes      |         
--------------|---------|------|-----|---------|-------------------------------------------|----------|---------

Comment 10 jalviso 2017-12-31 00:29:11 UTC
Tested and verified Comment#9 working on Satellite 6.3 Beta with installed packages:

satellite-6.3.0-21.0.beta.el7sat.noarch
tfm-rubygem-katello-3.4.5.25.2-1.el7sat.noarch

Comment 11 Satellite Program 2018-02-21 16:54:17 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-2018:0336