Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1362194 - No proper subscriptions created for custom products
Summary: No proper subscriptions created for custom products
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Content Management
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
high
high vote
Target Milestone: 6.2
Assignee: John Mitsch
QA Contact: jcallaha
URL: http://projects.theforeman.org/issues...
Whiteboard:
: 1365672 1367421 1368377 (view as bug list)
Depends On:
Blocks: 1122832
TreeView+ depends on / blocked
 
Reported: 2016-08-01 13:37 UTC by Maxim Burgerhout
Modified: 2018-12-06 20:45 UTC (History)
24 users (show)

Fixed In Version: rubygem-katello-3.0.0.74-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-14 21:01:19 UTC
Target Upstream Version:


Attachments (Terms of Use)
The 'null' product (deleted)
2016-08-01 13:37 UTC, Maxim Burgerhout
no flags Details
derived SKU from virtual datacetre subscription. (deleted)
2016-08-02 13:34 UTC, Stefan Nemeth
no flags Details
foreman-tail with candlepin and foreman debug enabled while accessing the null subscription (deleted)
2016-08-02 13:35 UTC, Stefan Nemeth
no flags Details
foreman-tail while uploading manifest (deleted)
2016-08-02 13:36 UTC, Stefan Nemeth
no flags Details
sosreport (deleted)
2016-08-02 14:28 UTC, Stefan Nemeth
no flags Details
jcalla foreman debug (deleted)
2016-08-11 16:10 UTC, jcallaha
no flags Details
jcalla production.log (deleted)
2016-08-11 16:16 UTC, jcallaha
no flags Details
Ver1 (deleted)
2016-09-01 17:56 UTC, jcallaha
no flags Details
Ver2 (deleted)
2016-09-01 17:57 UTC, jcallaha
no flags Details


Links
System ID Priority Status Summary Last Updated
Foreman Issue Tracker 15981 None None None 2016-08-04 14:02:39 UTC
Red Hat Product Errata RHBA-2016:1885 normal SHIPPED_LIVE Satellite 6.2.2 bug fix update 2016-09-15 00:57:56 UTC

Description Maxim Burgerhout 2016-08-01 13:37:53 UTC
Created attachment 1186435 [details]
The 'null' product

Description of problem:
When trying to assign a subscription for a custom product to an activation key, the activation key doesn't show up. The only thing that does show up in the list of subscriptions, is an entry named 'null', which you cannot add to the activation key either, because of the following error:

redhat?' for nil:NilClass

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

How reproducible:


Steps to Reproduce:
1. Create custom product
2. Navigate to an activation key, subscriptions, add
3. 

Actual results:
Product does not show up by itself, only an entry named 'null', which you cannot use (see above for error)

Expected results:
For each custom product a properly named subscription is created and it's possible to add those subs to activation keys

Additional info:

Comment 3 Stefan Nemeth 2016-08-02 13:32:11 UTC
Isn't it also related to bz 1343080 ? 

in case #01677258

Instead of derived SKU in webui, null is created for virtual datacenre subscription, however in cp_pool table, everything looks OK.

Comment 4 Stefan Nemeth 2016-08-02 13:34:02 UTC
Created attachment 1186829 [details]
derived SKU from virtual datacetre subscription.

Comment 5 Stefan Nemeth 2016-08-02 13:35:24 UTC
Created attachment 1186830 [details]
foreman-tail with candlepin and foreman debug enabled while accessing the null subscription

Comment 6 Stefan Nemeth 2016-08-02 13:36:51 UTC
Created attachment 1186831 [details]
foreman-tail while uploading manifest

Comment 7 Stefan Nemeth 2016-08-02 14:28:40 UTC
Created attachment 1186851 [details]
sosreport

Comment 10 John Mitsch 2016-08-04 13:31:40 UTC
Created redmine issue http://projects.theforeman.org/issues/15981 from this bug

Comment 12 Bryan Kearney 2016-08-04 16:16:55 UTC
Upstream bug component is Content Management

Comment 14 John Mitsch 2016-08-08 14:55:53 UTC
Created a new bug https://bugzilla.redhat.com/show_bug.cgi?id=1365189 to track the VDC null subscription issue as that looks like it is going to be a separate fix than a null subscription for a custom product.

Comment 15 jcallaha 2016-08-11 16:09:38 UTC
Came across this today. The product was "z stream". As a temporary workaround, adding the "nil" subscription to a content host will show the custom subscription throughout all interfaces. Have no idea how to reliably reproduce. I will paste and attach some relevant info/logs.  

[root@rhsm-qe-1 ~]# hammer -u admin -p changeme subscription list --organization-id 1
---|----------------------------------|-----------------------------------------|----------|---------|--------------|-----------|----------|------------------------------|-----------|---------
ID | UUID                             | NAME                                    | CONTRACT | ACCOUNT | SUPPORT      | QUANTITY  | CONSUMED | END DATE                     | QUANTITY  | ATTACHED
---|----------------------------------|-----------------------------------------|----------|---------|--------------|-----------|----------|------------------------------|-----------|---------
1  | 8a9084ef566b6ff101566b7a24d10230 | Employee SKU                            | 10169793 | 477931  | Self-Support | 10        | 3        | 2022-01-01T04:59:59.000+0000 | 10        | 3       
3  | 8a9084ef566b6ff101566b7a262d0392 | Red Hat Satellite Employee Subscription | 10538625 | 477931  | Self-Support | 10        | 0        | 2022-01-01T04:59:59.000+0000 | 10        | 0       
6  | 8a9084ef5675f27d01567a26f7f6006c | another one                             |          |         |              | Unlimited | 0        | 2046-08-04T15:09:49.128+0000 | Unlimited | 0       
---|----------------------------------|-----------------------------------------|----------|---------|--------------|-----------|----------|------------------------------|-----------|---------
[root@rhsm-qe-1 ~]# hammer -u admin -p changeme product info --id 147 --organization-id 1
ID:           147
Name:         z stream
Label:        z_stream
Description:  
Sync State:   Syncing Complete.
Sync Plan ID: 
GPG:          
    GPG Key ID: 
    GPG Key:
Organization: Default Organization
Readonly:     
Deletable:    
Content:      
 1) Repo Name:    capsule
    URL:          /custom/z_stream/capsule
    Content Type: yum
 2) Repo Name:    tools
    URL:          /custom/z_stream/tools
    Content Type: yum


after adding to content host

[root@rhsm-qe-1 ~]# hammer -u admin -p changeme subscription list --organization-id 1
---|----------------------------------|-----------------------------------------|----------|---------|--------------|-----------|----------|------------------------------|-----------|---------
ID | UUID                             | NAME                                    | CONTRACT | ACCOUNT | SUPPORT      | QUANTITY  | CONSUMED | END DATE                     | QUANTITY  | ATTACHED
---|----------------------------------|-----------------------------------------|----------|---------|--------------|-----------|----------|------------------------------|-----------|---------
1  | 8a9084ef566b6ff101566b7a24d10230 | Employee SKU                            | 10169793 | 477931  | Self-Support | 10        | 4        | 2022-01-01T04:59:59.000+0000 | 10        | 4       
3  | 8a9084ef566b6ff101566b7a262d0392 | Red Hat Satellite Employee Subscription | 10538625 | 477931  | Self-Support | 10        | 1        | 2022-01-01T04:59:59.000+0000 | 10        | 1       
5  | 8a9084ef5675f27d01567a1b20510056 | z stream                                |          |         |              | Unlimited | 1        | 2046-08-04T14:56:52.640+0000 | Unlimited | 1       
6  | 8a9084ef5675f27d01567a26f7f6006c | another one                             |          |         |              | Unlimited | 0        | 2046-08-04T15:09:49.128+0000 | Unlimited | 0       
7  | 8a9084ef5675f27d01567a4d3e7c0079 | Employee SKU                            | 10169793 | 477931  | Self-Support | Unlimited | 0        | 2022-01-01T04:59:59.000+0000 | Unlimited | 0       
---|----------------------------------|-----------------------------------------|----------|---------|--------------|-----------|----------|------------------------------|-----------|---------

Comment 16 jcallaha 2016-08-11 16:10:10 UTC
Created attachment 1190110 [details]
jcalla foreman debug

Comment 17 jcallaha 2016-08-11 16:16:21 UTC
Created attachment 1190111 [details]
jcalla production.log

Comment 18 John Mitsch 2016-08-15 17:59:37 UTC
jcalla,

This has split into two different bugs: null subscription after adding a custom product(tracked here), and null subscription from a VDC host (tracked in https://bugzilla.redhat.com/show_bug.cgi?id=1365189 ) 

Can you confirm that what you described happened after adding a custom product?

Comment 19 jcallaha 2016-08-15 18:01:34 UTC
John,

    Yep. This only happened after adding the first custom product. Subsequent custom products didn't have the same issue.

Comment 20 John Mitsch 2016-08-15 18:07:02 UTC
Thank you for clarifying

Comment 21 Brad Buckingham 2016-08-17 00:58:14 UTC
*** Bug 1365672 has been marked as a duplicate of this bug. ***

Comment 22 Brad Buckingham 2016-08-17 01:01:01 UTC
*** Bug 1367421 has been marked as a duplicate of this bug. ***

Comment 23 Sebastian Hetze 2016-08-18 11:10:30 UTC
Workaround:

For my BZ#1367421 I find that 'foreman-rake katello:reindex' makes the products appear correctly in the subscription list.

Comment 24 Maxim Burgerhout 2016-08-18 13:34:28 UTC
(In reply to Sebastian Hetze from comment #23)
> Workaround:
> 
> For my BZ#1367421 I find that 'foreman-rake katello:reindex' makes the
> products appear correctly in the subscription list.

+1 

Noticed the same thing this morning. Any chance we can get this documented in a KCS at the very least?

Comment 25 Zach Huntington-Meath 2016-08-19 14:43:38 UTC
*** Bug 1368377 has been marked as a duplicate of this bug. ***

Comment 26 Peter Vreman 2016-08-22 08:04:34 UTC
I did a clean installation again and applied the proposed fix https://patch-diff.githubusercontent.com/raw/Katello/katello/pull/6227.diff before starting any provisiioning.

I can confirm that the fix works

Comment 27 jcallaha 2016-09-01 17:48:06 UTC
Verified in Satellite 6.2.2. Custom subscriptions are now being created correctly for custom products. See attached images for verification.

Comment 28 jcallaha 2016-09-01 17:56:51 UTC
Created attachment 1196919 [details]
Ver1

Comment 29 jcallaha 2016-09-01 17:57:43 UTC
Created attachment 1196921 [details]
Ver2

Comment 32 errata-xmlrpc 2016-09-14 21:01:19 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:1885


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