[Satellite6] Cannot subscribe multiple pools in a physical system, Error "No subscriptions are available from the pool with ID '11111111111111112222222222222222'.
Environment
- Red Hat Satellite 6.x
- Red Hat Enterprise Linux
Issue
- RHEL physical system is not properly subscribe/Unentitled after adding a stack of quantity 1 of "Red Hat Enterprise Linux (physical or virtual)" subscription.
- Cannot subscribe multiple pools in a physical system, Error "No subscriptions are available from the pool with ID '11111111111111112222222222222222'.
- Error in production log:
2017-11-17 13:34:57 12749bf5 [app] [I] Started PUT "/api/v2/hosts/20/subscriptions/add_subscriptions" for 10.1.2.3 at 2017-11-17 13:34:57 -0600
2017-11-17 13:34:57 12749bf5 [app] [I] Processing by Katello::Api::V2::HostSubscriptionsController#add_subscriptions as JSON
2017-11-17 13:34:57 12749bf5 [app] [I] Parameters: {"id"=>"20", "subscriptions"=>[{"id"=>26, "quantity"=>0}, {"id"=>28, "quantity"=>0}], "api_version"=>"v2", "host_id"=>"20", "host_subscription"=>{"id"=>"20", "subscriptions"=>[{"id"=>26, "quantity"=>0}, {"id"=>28, "quantity"=>0}]}}
2017-11-17 13:34:58 [foreman-tasks/action] [E] No subscriptions are available from the pool with ID '11111111111111112222222222222222'. (Katello::Errors::CandlepinError) <== error
| /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.157/app/lib/actions/middleware/propagate_candlepin_errors.rb:21:in `rescue in propagate_candlepin_errors'
| /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.157/app/lib/actions/middleware/propagate_candlepin_errors.rb:19:in `propagate_candlepin_errors'
- Error in candlepin on the same timing:
2017-11-17 13:34:58,884 [thread=http-bio-8443-exec-1] [req=0133e7fe-dddc-4e4a-8dd8-e9c9646ff475, org=] INFO org.candlepin.common.filter.LoggingFilter - Request: verb=POST, uri=/candlepin/consumers/f8e0be7b-fbc8-4839-97fe-966e70c990fd/entitlements?pool=11111111111111112222222222222222 <================ pool
2017-11-17 13:34:58,935 [thread=http-bio-8443-exec-1] [req=0133e7fe-dddc-4e4a-8dd8-e9c9646ff475, org=ORGZ] INFO org.candlepin.resource.ConsumerResource - Checked if consumer has unaccepted subscription terms in 0ms
2017-11-17 13:34:58,946 [thread=http-bio-8443-exec-1] [req=0133e7fe-dddc-4e4a-8dd8-e9c9646ff475, org=ORGZ] INFO org.candlepin.controller.Entitler - Looking up pool to bind: 11111111111111112222222222222222
2017-11-17 13:34:58,946 [thread=http-bio-8443-exec-1] [req=0133e7fe-dddc-4e4a-8dd8-e9c9646ff475, org=ORGZ] INFO org.candlepin.controller.CandlepinPoolManager - Locking pool 11111111111111112222222222222222
2017-11-17 13:34:58,960 [thread=http-bio-8443-exec-1] [req=0133e7fe-dddc-4e4a-8dd8-e9c9646ff475, org=ORGZ] INFO org.candlepin.controller.CandlepinPoolManager - Running pre-entitlement rules.
2017-11-17 13:34:58,963 [thread=http-bio-8443-exec-1] [req=0133e7fe-dddc-4e4a-8dd8-e9c9646ff475, org=ORGZ] WARN org.candlepin.controller.CandlepinPoolManager - Entitlement not granted: [rulefailed.no.entitlements.available]
2017-11-17 13:34:58,965 [thread=http-bio-8443-exec-1] [req=0133e7fe-dddc-4e4a-8dd8-e9c9646ff475, org=ORGZ] INFO org.candlepin.common.filter.LoggingFilter - Response: status=403, content-type="application/json", time=81
Resolution
Workaround:
- Remove the subscription line added in manifest with the odd number quantity and re-add the same subscription with even number quantity.
- Add the same subscription/contract with even number quantity.
- Refresh the manifest in Satellite 6 WEBUI.
Note: There is an upcoming update in Customer Portal to edit the quantity of Subscription Management Application/manifest.
Root Cause
To subscribe a physical system using "RHEL Server (Physical or virtual)", the quantity must be in pair:
4.4. STACKING SUBSCRIPTION
Diagnostic Steps
- The manifest is added with half of a subscription (qty 1):
# hammer subscription list --organization-id 1
---|----------------------------------|----------------------------------------------------------------------------------|----------|---------|--------------|-----------|----------|------------------------------|-----------|---------
ID | UUID | NAME | CONTRACT | ACCOUNT | SUPPORT | QUANTITY | CONSUMED | END DATE | QUANTITY | ATTACHED
---|----------------------------------|----------------------------------------------------------------------------------|----------|---------|--------------|-----------|----------|------------------------------|-----------|---------
21 | abcdefghijklmnopqrstuvwxyz12345678 | Red Hat Enterprise Linux for Virtual Datacenters with Smart Management, Premium | 87654321 | 123456 | Premium | 12 | 6 | 2018-10-14T03:59:59.000+0000 | 12 | 6
23 | 11111111111111112222222222222222 | Red Hat Enterprise Linux Server with Smart Management, Standard (Physical or ... | 12345678 | 123456 | Standard | 1 | 0 | 2018-10-14T03:59:59.000+0000 | 1 | 0 <====
24 | 99999999999999998888888888888888 | Red Hat Enterprise Linux Server with Smart Management, Standard (Physical or ... | 11112222 | 123456 | Standard | 1 | 0 | 2018-10-14T03:59:59.000+0000 | <====
- Attaching/stacking 2 pools of "RHEL Server (Physical or virtual)" subscription with quantity 1 each to a physical system with 2 cpu sockets fails:
# subscription-manager attach --pool=11111111111111112222222222222222 --pool=99999999999999998888888888888888
No subscriptions are available from the pool with ID '11111111111111112222222222222222'.
No subscriptions are available from the pool with ID '99999999999999998888888888888888'.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments