Bug 837914

Summary: autosubscription with activation key fails for virtual type subscription with vcpu>=2 guest.
Product: Red Hat Satellite Reporter: Tom McKay <tomckay>
Component: Content ManagementAssignee: Tom McKay <tomckay>
Status: CLOSED WONTFIX QA Contact: Katello QA List <katello-qa-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.0.0CC: enakai, mmccune
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 837143 Environment:
Last Closed: 2014-03-18 17:38:14 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: 837143    
Bug Blocks:    

Description Tom McKay 2012-07-05 19:47:11 UTC
+++ This bug was initially created as a clone of Bug #837143 +++

Description of problem:

Auto-subscription using activation key fails with the error,

  Multi-entitlement not supported for pool with id XXXXX

under the condition:

1. Activation Key contains only virtual type subscription.
2. RHEL guest VM to subscribe has multilple vCPUs.


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

For SAM server:
# rpm -qa | grep -E "(katello|candlepin)"
katello-configure-0.3.7-1.el6_2.noarch
katello-cli-headpin-0.2.2-1.el6_2.noarch
candlepin-tomcat6-0.6.5-1.el6_2.noarch
katello-certs-tools-1.1.5-1.el6_2.noarch
katello-common-0.3.3-1.el6_2.noarch
katello-headpin-0.2.13-1.el6_2.noarch
katello-glue-candlepin-0.3.3-1.el6_2.noarch
katello-cli-common-0.3.5-2.el6_2.noarch
candlepin-0.6.5-1.el6_2.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-selinux-0.2.4-1.el6_2.noarch
katello-headpin-all-0.2.13-1.el6_2.noarch

For Guset VM:
# rpm -qa | grep subscription
subscription-manager-0.99.19.3-1.el6_3.x86_64



How reproducible:

1. Register and subscribe KVM host with physical type subscription.
2. Create activation key containing only virtual type subscription derived from the physical one.
3. Register KVM guest using the activation key.


Actual results:

If the guest VM has two vCPUs, subscription fails with the error:
  Multi-entitlement not supported for pool with id XXXXX.

If the guest VM has one vCPU, it succeeds as expected.


I investigated the exceution path of this failed process.

1. Katello successfully POSTed the request to Candlepin with the following URI:
(POST /candlepin/consumers/c65be5db-0fae-4919-8c96-a72a1d93b36f/entitlements?pool=4028fa8b3846bd3e013847f0d3f402b8&quantity=2)

2. Then, Candlepin *possiblly* returns the exception "rulefailed.pool.does.not.support.multi-entitlement" at the following point of code.

./src/main/resources/rules/default-rules.js
 564  if (pre.getQuantity() > 1 && product.getAttribute("multi-entitlement") != "yes") {
 565      pre.addError("rulefailed.pool.does.not.support.multi-entitlement");
 566  }


I guess either of them would be the root cause of the problem.

- The quantity attribute should not reflect the number of vCPUs?
- Candlepin should accept quantity>1 for non-muti-entitlement subscription?

--- Additional comment from enakai on 2012-07-03 08:52:34 EDT ---

I changed the component to Katello as it wouldn't be a Candlepin's problem.

It looks Katello always assumes that the number of subscription (quantity) should equal to the number of sockets when auto-subscribing with an activation key. But all subscriptions don't necessarily follow that rule.

Activation key needs to contain information not only for subscriptions but also for their consumption rules, right?

Comment 1 Mike McCune 2014-03-18 17:38:14 UTC
This bug was closed because of a lack of activity.  If you feel this bug should be reconsidered for attention please feel free to re-open the bug with a comment stating why it should be reconsidered.