Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1362194 - No proper subscriptions created for custom products
No proper subscriptions created for custom products
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Content Management (Show other bugs)
6.2.0
Unspecified Unspecified
high Severity high (vote)
: 6.2.2
: Unused
Assigned To: John Mitsch
jcallaha
http://projects.theforeman.org/issues...
: Regression, Triaged
: 1365672 1367421 1368377 (view as bug list)
Depends On:
Blocks: 1122832
  Show dependency treegraph
 
Reported: 2016-08-01 09:37 EDT by Maxim Burgerhout
Modified: 2017-06-27 08:58 EDT (History)
24 users (show)

See Also:
Fixed In Version: rubygem-katello-3.0.0.74-1
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-09-14 17:01:19 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
The 'null' product (25.12 KB, image/png)
2016-08-01 09:37 EDT, Maxim Burgerhout
no flags Details
derived SKU from virtual datacetre subscription. (31.63 KB, image/jpeg)
2016-08-02 09:34 EDT, Stefan Nemeth
no flags Details
foreman-tail with candlepin and foreman debug enabled while accessing the null subscription (344.30 KB, text/plain)
2016-08-02 09:35 EDT, Stefan Nemeth
no flags Details
foreman-tail while uploading manifest (437.56 KB, text/plain)
2016-08-02 09:36 EDT, Stefan Nemeth
no flags Details
sosreport (11.75 MB, application/x-xz)
2016-08-02 10:28 EDT, Stefan Nemeth
no flags Details
jcalla foreman debug (950.71 KB, application/x-xz)
2016-08-11 12:10 EDT, jcallaha
no flags Details
jcalla production.log (7.77 MB, application/x-gzip)
2016-08-11 12:16 EDT, jcallaha
no flags Details
Ver1 (101.42 KB, image/png)
2016-09-01 13:56 EDT, jcallaha
no flags Details
Ver2 (103.00 KB, image/png)
2016-09-01 13:57 EDT, jcallaha
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 15981 None None None 2016-08-04 10:02 EDT
Red Hat Product Errata RHBA-2016:1885 normal SHIPPED_LIVE Satellite 6.2.2 bug fix update 2016-09-14 20:57:56 EDT

  None (edit)
Description Maxim Burgerhout 2016-08-01 09:37:53 EDT
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 09:32:11 EDT
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 09:34 EDT
Created attachment 1186829 [details]
derived SKU from virtual datacetre subscription.
Comment 5 Stefan Nemeth 2016-08-02 09:35 EDT
Created attachment 1186830 [details]
foreman-tail with candlepin and foreman debug enabled while accessing the null subscription
Comment 6 Stefan Nemeth 2016-08-02 09:36 EDT
Created attachment 1186831 [details]
foreman-tail while uploading manifest
Comment 7 Stefan Nemeth 2016-08-02 10:28 EDT
Created attachment 1186851 [details]
sosreport
Comment 10 John Mitsch 2016-08-04 09:31:40 EDT
Created redmine issue http://projects.theforeman.org/issues/15981 from this bug
Comment 12 Bryan Kearney 2016-08-04 12:16:55 EDT
Upstream bug component is Content Management
Comment 14 John Mitsch 2016-08-08 10:55:53 EDT
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 12:09:38 EDT
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 12:10 EDT
Created attachment 1190110 [details]
jcalla foreman debug
Comment 17 jcallaha 2016-08-11 12:16 EDT
Created attachment 1190111 [details]
jcalla production.log
Comment 18 John Mitsch 2016-08-15 13:59:37 EDT
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 14:01:34 EDT
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 14:07:02 EDT
Thank you for clarifying
Comment 21 Brad Buckingham 2016-08-16 20:58:14 EDT
*** Bug 1365672 has been marked as a duplicate of this bug. ***
Comment 22 Brad Buckingham 2016-08-16 21:01:01 EDT
*** Bug 1367421 has been marked as a duplicate of this bug. ***
Comment 23 Sebastian Hetze 2016-08-18 07:10:30 EDT
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 09:34:28 EDT
(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 10:43:38 EDT
*** Bug 1368377 has been marked as a duplicate of this bug. ***
Comment 26 Peter Vreman 2016-08-22 04:04:34 EDT
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 13:48:06 EDT
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 13:56 EDT
Created attachment 1196919 [details]
Ver1
Comment 29 jcallaha 2016-09-01 13:57 EDT
Created attachment 1196921 [details]
Ver2
Comment 32 errata-xmlrpc 2016-09-14 17:01:19 EDT
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.