Bug 837143 - autosubscription with activation key fails for virtual type subscription with vcpu>=2 guest.
autosubscription with activation key fails for virtual type subscription with...
Status: CLOSED WONTFIX
Product: Subscription Asset Manager
Classification: Red Hat
Component: katello (Show other bugs)
1.3
Unspecified Unspecified
unspecified Severity high
: rc
: ---
Assigned To: Tom McKay
SAM QE List
: Triaged
Depends On:
Blocks: sam20-tracker 837914
  Show dependency treegraph
 
Reported: 2012-07-02 20:13 EDT by Etsuji Nakai
Modified: 2016-03-10 22:31 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 837914 (view as bug list)
Environment:
Last Closed: 2016-03-10 22:31:55 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Etsuji Nakai 2012-07-02 20:13:37 EDT
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?
Comment 1 Etsuji Nakai 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?

Note You need to log in before you can comment on or make changes to this bug.