Bug #10208
Auto-attach subscriptions not working for content hosts with custom products only
Description
If a content host is registered using an activation key that contains subscriptions to custom products only, auto-attach is not performed.
Associated revisions
History
#1
Updated by Eric Helms almost 4 years ago
- Triaged changed from No to Yes
You are seeing this with RC3 of 2.2? With the auto-attach flag on the activation key enabled or on the content host?
#2
Updated by Eric Helms almost 4 years ago
- Status changed from New to Need more information
#3
Updated by Martin Matuška almost 4 years ago
Yes, I am using 2.2 RC3, auto-attach flag is enabled. Tested hosts are CentOS 7 and CentOS 6
#4
Updated by Anonymous almost 4 years ago
Martin Matuška wrote:
If a content host is registered using an activation key that contains subscriptions to custom products only, auto-attach is not performed.
I can see the same issue with my own custom and PuppetLabs repositories.
#5
Updated by Anonymous almost 4 years ago
I get this error message in /var/log/candlepin/error.log:
2015-05-04 13:11:39,031 [req=4e9d9f26-1a4f-4fcc-b7a9-fd4b6f39de64, org=] WARN org.candlepin.resource.util.ConsumerBindUtil - Unable to attach a subscription for a product that has no pool: null
#6
Updated by Eric Helms almost 4 years ago
- Legacy Backlogs Release (now unused) changed from 23 to 51
#7
Updated by Christine Fouant almost 4 years ago
Do either of you have a service-level set on the key you are trying to use? I have been able to recreate this issue, but only when a service level is associated with the key. A bug was opened earlier today in regards to this issue: http://projects.theforeman.org/issues/10398
#8
Updated by Christine Fouant almost 4 years ago
- Assignee set to Christine Fouant
#9
Updated by Anonymous almost 4 years ago
Christine Fouant wrote:
Do either of you have a service-level set on the key you are trying to use? I have been able to recreate this issue, but only when a service level is associated with the key. A bug was opened earlier today in regards to this issue: http://projects.theforeman.org/issues/10398
There was no service-level configured when I tested, but when I created the Activation Key I set a service-level.
#10
Updated by Christine Fouant almost 4 years ago
Okay - while the other bug is being fixed, can you try removing the setting on the activation key and then try to register again? I believe this is the issue as I have not been able to reproduce this any other way.
#11
Updated by Anonymous almost 4 years ago
Christine Fouant wrote:
Okay - while the other bug is being fixed, can you try removing the setting on the activation key and then try to register again? I believe this is the issue as I have not been able to reproduce this any other way.
Scenario 1: Red Hat subscription + 1 one non RH, without service level defined in activation key = works
Scenario 2: Red Hat subscription + 1 one non RH, with service level defined in activation key = does not work
Scenario 3: CentOS subscription + 1 one non RH, without service level defined in activation key = does not work
Auto-Attach was enabled on all Activation Keys.
#12
Updated by Christine Fouant almost 4 years ago
Thank you for the additional details. I will look further into this. Disabling auto-attach should allow all subscriptions to attach if you need a workaround in the meantime.
#13
Updated by Garrett D almost 4 years ago
My scenarios for this bug are:
CentOS subscription + multiple non-RH, no service level = Does not work.
CentOS subscription + multiple non-RH, with service level = Does not work.
Redhat subscription + multiple non-RH, no service level = Works
Auto Attach enabled for all Keys.
#14
Updated by Eric Helms almost 4 years ago
- Status changed from Need more information to Assigned
#15
Updated by Christine Fouant over 3 years ago
I'm not sure what you guys mean by CentOS subscriptions. Do you mean a custom product that contain CentOS rpms? I believe those are still just custom products.
I have tried this a few times using Katello 2.2, and have not been able to recreate. When I register a system using an activation key (without service levels defined), all of my custom products are listed when I run:
#subscription-manager list --consumed
Furthermore, when I run a yum install on one of the repos attached to the custom product, the repos are available and readily attach.
Would you mind sending screenshots of the following tabs on the Activation Key? Details, Subscriptions, Product Content. Also please indicate what subscription-manager list --consumed is returning, and what version of Katello you are using.
#16
Updated by Eric Helms over 3 years ago
- Legacy Backlogs Release (now unused) changed from 51 to 55
#17
Updated by Christine Fouant over 3 years ago
- Status changed from Assigned to Need more information
#18
Updated by Eric Helms over 3 years ago
- Legacy Backlogs Release (now unused) changed from 55 to 61
#19
Updated by The Foreman Bot over 3 years ago
- Status changed from Need more information to Ready For Testing
- Pull request https://github.com/Katello/katello/pull/5386 added
- Pull request deleted (
)
#20
Updated by Eric Helms over 3 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset katello|1a6cf418e421e3fa8ae3b61af92fbe1721cca923.
#21
Updated by Viktor Varga over 3 years ago
I think I have the same problem with version 2.3.0
rpm -qi katello
Name : katello
Version : 2.3.0
Release : 5.el7
Architecture: noarch
Does anybody reported the same for 2.3.0?
#22
Updated by Viktor Varga over 3 years ago
Viktor Varga wrote:
I think I have the same problem with version 2.3.0
rpm -qi katello
Name : katello
Version : 2.3.0
Release : 5.el7
Architecture: noarchDoes anybody reported the same for 2.3.0?
So I applied the #5386 pull request on candlepin.rb and that fixed the problem.
(https://github.com/Katello/katello/commit/6c81a24e6658e79b54f3a7e012f176956b8434a8)
Thanks,
#23
Updated by Eric Helms over 3 years ago
This fix should go out in both 2.2.3 (hopefully today) and the eventual 2.3 final release.
#24
Updated by Bryan Kearney over 3 years ago
- Bugzilla link set to 1274693
#25
Updated by Eric Helms over 3 years ago
- Legacy Backlogs Release (now unused) changed from 61 to 70
#26
Updated by Justin Sherrill almost 3 years ago
- Bugzilla link changed from 1274693 to 1271221
#27
Updated by Justin Sherrill almost 3 years ago
- Bugzilla link deleted (
1271221)
Fixes #10208: Fix auto-attach on activation keys with custom products.
When using custom products only in an activation key with auto attach,
we were sending a null value for installedProducts to Candlepin. This
caused Candlepin to error out iterating over a null value (instead of
an array). Here we make sure to send an array if installedProducts is
nil so that Candlepin processes the request properly and thus fix
auto attach with custom products.