Bug 1370496

Summary: Custom products in Activation key are not subscribed when service_level is set
Product: Red Hat Satellite Reporter: Peter Vreman <peter.vreman>
Component: CandlepinAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: jcallaha
Severity: high Docs Contact:
Priority: high    
Version: 6.2.0CC: bbuckingham, bcourt, bkearney, brubisch, dlezzoum, jcallaha, jsherril, mmccune, tspeetje, xdmoon, zhunting
Target Milestone: UnspecifiedKeywords: PrioBumpField, Reopened, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: candlepin-0.9.54.12-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1370508 1394357 (view as bug list) Environment:
Last Closed: 2016-10-04 06:44:50 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: 1370508, 1383783, 1384159    
Bug Blocks: 1122832, 1385841, 1394357    
Attachments:
Description Flags
sat ui works
none
host end doesn't work
none
foreman debug none

Description Peter Vreman 2016-08-26 13:28:18 UTC
Description of problem:
Custom products in Activation key are not subscribed n the host when service_level is set on the Activation Key

Also after subscribing the host in the Content Host - susbcriptions the susbcritptions are not listed

Regression over 6.0 and 6.1

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


How reproducible:


Steps to Reproduce:
1. Create Product ProdA
2. Create ActivationKey ActKeyA
3. Assign a RedHat sub with level premium to ActivationKey ActKeyA
4. Assign a Product sub of ProdA to ActKeyA
5. Set service_level on ActKeyA to Premium
6. Register host to Activation key ActKeyA
7. List consumed subscription on host
8. List the subscrioption ion the Content Hsot in Katello

Actual results:
Step 7 Subscription of ProdA is not included
Step 8 Subscription of ProdA is not listed

Expected results:
Step 7 Subscription of ProdA is assigned
Step 8 Subscription of ProdA is listed


Additional info:

Comment 1 Justin Sherrill 2016-08-26 13:30:08 UTC
*** Bug 1370494 has been marked as a duplicate of this bug. ***

Comment 7 Zach Huntington-Meath 2016-09-21 20:22:10 UTC
What build of Candlepin is this fix in?

Comment 8 Barnaby Court 2016-09-21 20:54:26 UTC
Zach, It has been merged upstream but the build has not been done. The next scheduled build is in a few weeks. If you would like it earlier let me know.

Comment 10 jcallaha 2016-09-28 18:58:33 UTC
Failed QA in Satellite 6.2.2 Async Snap 1

Followed steps listed in initial filing. The subscriptions are correctly listed in the satellite UI, but the custom product isn't listed by subscription manager on the content host's end.

See attached screenshots.

Comment 11 jcallaha 2016-09-28 18:59:10 UTC
Created attachment 1205637 [details]
sat ui works

Comment 12 jcallaha 2016-09-28 18:59:58 UTC
Created attachment 1205638 [details]
host end doesn't work

Comment 13 Barnaby Court 2016-09-28 19:50:28 UTC
Please attach the candlepin log files showing both the successful attach and the unsuccessful attach. Simplest method would be a foreman debug with both.

Comment 14 jcallaha 2016-09-28 20:00:05 UTC
Created attachment 1205647 [details]
foreman debug

Comment 15 jcallaha 2016-09-28 20:43:02 UTC
Verified in Satellite 6.2.2 Async Snap 1.

After reviewing with Barnaby, the bug has indeed been fixed and the custom subscription shows up when passing the --consumed flag

[root@ch-d ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name:   Red Hat Enterprise Linux Server, Premium (8 sockets) (Unlimited guests)
....

Subscription Name:   async
Provides:            async
SKU:                 1475074512255
Contract:            
Account:             
Serial:              3628336102300395820
Pool ID:             8a9084ef576da1a00157714ad7290487
Provides Management: No
Active:              True
Quantity Used:       1
Service Level:       
Service Type:        
Status Details:      Subscription is current
Subscription Type:   Standard
Starts:              09/28/16
Ends:                09/21/46
System Type:         Physical

Comment 17 errata-xmlrpc 2016-10-04 06:44:50 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:1993

Comment 18 Justin Sherrill 2016-10-11 18:06:09 UTC
Failing this as it doesn't seem to be applied upon upgrade.

Comment 20 Justin Sherrill 2016-10-13 19:49:44 UTC
It requires these two bzs to be fixed:

https://bugzilla.redhat.com/show_bug.cgi?id=1383783
https://bugzilla.redhat.com/show_bug.cgi?id=1384159

and a new version of candlepin

Comment 24 jcallaha 2016-12-01 18:35:11 UTC
Verified in Satellite 6.2.5 in systems upgraded to this release (from 6.1.11 and 6.2.4).

-bash-4.2# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name:   625
Provides:            625
SKU:                 1480525662975
Contract:            
Account:             
Serial:              7604500406921790593
Pool ID:             8a9084ef58b62f010158b634cc220002
Provides Management: No
Active:              True
Quantity Used:       1
Service Level:       
Service Type:        
Status Details:      Subscription is current
Subscription Type:   Standard
Starts:              11/30/2016
Ends:                11/23/2046
System Type:         Physical

Comment 25 Bryan Kearney 2016-12-12 18:48:25 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:2940

Comment 26 Bryan Kearney 2016-12-12 18:48:26 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:2940

Comment 27 Djebran Lezzoum 2017-09-26 14:46:46 UTC
qe_test_coverage PR: https://github.com/SatelliteQE/robottelo/pull/5282