Bug 1317694

Summary: Activation Key Subscriptions Auto-Attach not working properly
Product: Red Hat Satellite Reporter: Tom McKay <tomckay>
Component: Content ManagementAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED CURRENTRELEASE QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: bkearney, klaas, mdekan, tomckay
Target Milestone: UnspecifiedKeywords: Reopened
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-15 21:01:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tom McKay 2016-03-14 22:01:50 UTC
When registering a host with an activation key that contains custom subscriptions and auto-attach=true, red hat subscriptions are not attached.
Our key contains the following Product Subscriptions: a proprietary product, EPEL, HP, Dell, VMware, Katello Client, Puppet.  No Red Hat subs are added as auto-attach should find them automatically.  When the host registers, it will add *only* the custom products.  Manually running Auto-Attach, the appropriate RH subs are added.

Prior to Katello 2.4, this worked when we added custom subscriptions and all our Red Hat subscriptions to the key (both physical, and virtual datacenter guest subs).  Now we are not able to add multiple VDC guest subs to a key.


Our current workaround is to use 2 keys, one for Red Hat subs, and one for custom.


Output in /var/log/candlepin/candlepin.log for the host's UUID during registration:
<pre>
2016-03-14 17:54:20,324 [req=125416ef-d733-4bee-8d53-79c03b5e3770, org=] INFO  org.candlepin.resource.ConsumerResource - Consumer e9802fbe-5681-4e04-8627-45e31afbb140 created in org xxxxxxxx
2016-03-14 17:54:22,038 [req=a1d4bee2-7458-420f-9b65-9f54571886e1, org=] INFO  org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/consumers/e9802fbe-5681-4e04-8627-45e31afbb140
2016-03-14 17:54:23,543 [req=0bdcdf92-c74a-4ec2-a480-023502aed6e4, org=] INFO  org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/consumers/e9802fbe-5681-4e04-8627-45e31afbb140
2016-03-14 17:54:23,703 [req=1e8ddb2e-5ef1-4768-bcc9-477cf0a45e83, org=] INFO  org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/consumers/e9802fbe-5681-4e04-8627-45e31afbb140/certificates/serials
2016-03-14 17:54:23,890 [req=2715201d-49c3-43d3-bd5b-e4123242e60c, org=] INFO  org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/consumers/e9802fbe-5681-4e04-8627-45e31afbb140/certificates?serials=4955668654135756490,621368389686531243,260855579363853393,1109848999340993647,1578481197453257151,718351331378284847,6779464690069033033
2016-03-14 17:54:24,104 [req=1d495dce-699d-40bd-b1a6-36dc2b169a7f, org=] INFO  org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/consumers/e9802fbe-5681-4e04-8627-45e31afbb140/content_overrides
2016-03-14 17:54:24,230 [req=615bf04a-f5b9-486c-beff-9e9c1e49c291, org=] INFO  org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/consumers/e9802fbe-5681-4e04-8627-45e31afbb140/compliance
2016-03-14 17:54:24,365 [req=33462f77-14fa-4739-bfdc-5d9915a4d428, org=] INFO  org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/consumers/e9802fbe-5681-4e04-8627-45e31afbb140
</pre>

Comment 1 Tom McKay 2016-03-14 22:01:51 UTC
Created from redmine issue http://projects.theforeman.org/issues/14195

Comment 3 Bryan Kearney 2016-07-26 15:25:24 UTC
Moving 6.2 bugs out to sat-backlog.

Comment 4 Bryan Kearney 2016-07-26 15:32:55 UTC
Moving 6.2 bugs out to sat-backlog.

Comment 6 Bryan Kearney 2016-07-26 19:07:51 UTC
Upstream said this is no longer an issue. Closing this out.

Comment 9 Bryan Kearney 2017-02-09 17:59:42 UTC
Tom check me on this.. I think with

https://access.redhat.com/documentation/en/red-hat-satellite/6.2/paged/host-configuration-guide/62-defining-subscription-properties-of-an-activation-key

the user needs to use multiple activation keys. One with auto-attach and one with not. Is that correct?

-- bk

Comment 10 Tom McKay 2017-02-15 21:01:10 UTC
An activation key with both Red Hat and custom products will have the Red Hat ones auto-attached and the custom ones always attached. This works correctly in Sat-6.2

Comment 11 Klaas Demter 2017-04-19 12:32:22 UTC
Tom McKay could you link to the change that introduced this behaviour? I can't have a single activation key with redhat auto-attach content and custom subscriptions. Tested this as recently as katello 3.3.1

Greetings
Klaas