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:
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.
Created attachment 1186829 [details] derived SKU from virtual datacetre subscription.
Created attachment 1186830 [details] foreman-tail with candlepin and foreman debug enabled while accessing the null subscription
Created attachment 1186831 [details] foreman-tail while uploading manifest
Created attachment 1186851 [details] sosreport
Created redmine issue http://projects.theforeman.org/issues/15981 from this bug
Upstream bug component is Content Management
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.
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 ---|----------------------------------|-----------------------------------------|----------|---------|--------------|-----------|----------|------------------------------|-----------|---------
Created attachment 1190110 [details] jcalla foreman debug
Created attachment 1190111 [details] jcalla production.log
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?
John, Yep. This only happened after adding the first custom product. Subsequent custom products didn't have the same issue.
Thank you for clarifying
*** Bug 1365672 has been marked as a duplicate of this bug. ***
*** Bug 1367421 has been marked as a duplicate of this bug. ***
Workaround: For my BZ#1367421 I find that 'foreman-rake katello:reindex' makes the products appear correctly in the subscription list.
(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?
*** Bug 1368377 has been marked as a duplicate of this bug. ***
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
Verified in Satellite 6.2.2. Custom subscriptions are now being created correctly for custom products. See attached images for verification.
Created attachment 1196919 [details] Ver1
Created attachment 1196921 [details] Ver2
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