Bug 1008647 - [RFE] bind requests that do not specify a quantity should automatically use the quantity needed to achieve compliance
[RFE] bind requests that do not specify a quantity should automatically use t...
Status: CLOSED CURRENTRELEASE
Product: Candlepin
Classification: Community
Component: candlepin (Show other bugs)
0.9
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Carter Kozak
Katello QA List
:
Depends On:
Blocks: rhsm-rhel65
  Show dependency treegraph
 
Reported: 2013-09-16 14:19 EDT by John Sefler
Modified: 2015-05-14 10:52 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-12-05 08:46:42 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description John Sefler 2013-09-16 14:19:30 EDT
Description of problem:
This is the server-side of bug 1008557.

In light of the increasing number of subscription types (instance based, ram, cores, sockets) that often require a quantity more than one to achieve compliance, it would be helpful for the candlepin server to automatically give a CLI consumer the quantity needed to achieve compliance when the --quantity option is not explicitly specified by the CLI consumer.

I believe this will facilitate the transition to new instance-based subscriptions and avoid this troublesome stdout attachment message:
  "Quantity '%s' is not a multiple of instance multiplier '%s'"
Comment 2 Carter Kozak 2013-09-19 14:54:51 EDT
commit c67def26a24c2a43c1133995ad08ed27d18bb86d
Author: ckozak <ckozak@redhat.com>
Date:   Tue Sep 17 11:57:02 2013 -0400

    1007836: calculate suggested quantity with only matching stacking_ids

commit 92f3f326a6423b8c5c49e482d529f38d70b02abc
Author: ckozak <ckozak@redhat.com>
Date:   Tue Sep 17 10:56:17 2013 -0400

    check if quantity is null when autobinding

commit 9a3c7e6b6fd4a764a301a69a6ee978533def9ddd
Author: ckozak <ckozak@redhat.com>
Date:   Mon Sep 16 11:23:49 2013 -0400

    added spec tests

commit a3dc68dd151a91cdb856d13e187aa580ddb99d01
Author: Carter Kozak <ckozak@redhat.com>
Date:   Fri Sep 13 20:48:08 2013 -0400

    fixed up spec tests

commit a3961d8a76318bb2a0a6878e26dfffc0fbf88d9b
Author: ckozak <ckozak@redhat.com>
Date:   Fri Sep 13 18:07:29 2013 -0400

    change default attach value to suggested quantity

commit 83ea92df468fd4b231abe3881f08730e90d544be
Author: ckozak <ckozak@redhat.com>
Date:   Fri Sep 13 17:59:21 2013 -0400

    default quantity is the suggested quantity
Comment 3 Bryan Kearney 2013-09-26 14:15:05 EDT
fixed in 0.8.28-1
Comment 4 John Sefler 2013-10-08 17:16:47 EDT
Verifying Version...
[root@jsefler-6 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 0.8.28-1
subscription-manager: 1.9.9-1.el6
python-rhsm: 1.9.6-1.el6


[root@jsefler-6 ~]# subscription-manager facts --list | grep cpu_socket
cpu.cpu_socket(s): 16
[root@jsefler-6 ~]# subscription-manager register 
Username: testuser1
Password: 
Organization: admin
The system has been registered with ID: 69b7f787-c13f-468a-a9c7-1e76239e2af3 
[root@jsefler-6 ~]# subscription-manager auto-attach --disable
Auto-attach preference: disabled
[root@jsefler-6 ~]# 
[root@jsefler-6 ~]# subscription-manager list --avail
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+
Subscription Name: Multi-Attribute Stackable (16 cores, 4 sockets, 8GB RAM)
Provides:          Multi-Attribute Limited Product
SKU:               sock-core-ram-multiattr
Pool ID:           8a9087404175311a01417531d71905c6
Available:         5
Suggested:         4                       <========= VERIFIED BUG 1008557
Service Level:     Super
Service Type:      Level 3
Multi-Entitlement: Yes
Ends:              09/30/2014
System Type:       Physical

[root@jsefler-6 ~]# 
[root@jsefler-6 ~]# subscription-manager attach --pool 8a9087404175311a01417531d71905c6
Successfully attached a subscription for: Multi-Attribute Stackable (16 cores, 4 sockets, 8GB RAM)
[root@jsefler-6 ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name: Multi-Attribute Stackable (16 cores, 4 sockets, 8GB RAM)
Provides:          Multi-Attribute Limited Product
SKU:               sock-core-ram-multiattr
Contract:          0
Account:           12331131231
Serial:            5499075467547058958
Pool ID:           8a9087404175311a01417531d71905c6
Active:            True
Quantity Used:     4                <=============== VERIFIED BUG 1008647
Service Level:     Super
Service Type:      Level 3
Status Details:    
Starts:            09/30/2013
Ends:              09/30/2014
System Type:       Physical

[root@jsefler-6 ~]# 


VERIFIED: Although no --quantity value was specified during the call to subscription-manager attach, the needed quantity is now used to achieve compliance.

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