Bug 582223 - Client able to subscribe multiple time for specific entitlement
Summary: Client able to subscribe multiple time for specific entitlement
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Candlepin
Classification: Community
Component: candlepin
Version: 0.5
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
: ---
Assignee: Bryan Kearney
QA Contact: Katello QA List
URL:
Whiteboard:
: 578148 586506 (view as bug list)
Depends On:
Blocks: ent2
TreeView+ depends on / blocked
 
Reported: 2010-04-14 12:48 UTC by spandey
Modified: 2018-12-10 15:37 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2018-12-10 15:37:07 UTC
Embargoed:


Attachments (Terms of Use)

Description spandey 2010-04-14 12:48:54 UTC
Description of problem:


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


How reproducible:
100%

prerequisites 

subscription manager version 37
Rhel6 Registered with candlepin Host 

Steps to Repro : 

Login to the client with valid credentials

Execute  three time Following command on host console to subscribe for entitlement virtualization_host

subscription-manager-cli subscribe –product=virtualization_host
 
subscription-manager-cli subscribe –product=virtualization_host

subscription-manager-cli subscribe –product=virtualization_host

Expected Result : 
At second attempt proper message should display 
Already registered for entitlement “virtualization_host”

Actual Result :
At every step client is getting register for entitlement “virtualization_host”
and pool number has been decreased from candlepin host .


[root@sachrhel6 ~]# subscription-manager-cli unsubscribe --product=provisioning

SPACEWALK-001

virtualization_host

monitoring

virtualization_host

virtualization_host

virtualization_host

monitoring

monitoring

monitoring

monitoring

monitoring

monitoring

monitoring

Comment 1 Devan Goodwin 2010-04-14 13:02:42 UTC
The plan to solve this was:

- Modify default Javascript rule to deny by default.
- Add a check for a product attribute which would indicate we wish to allow multi-entitlement for that product.
- Modify default Javascript rule to allow if this attribute is present.

Comment 3 RHEL Program Management 2010-04-14 13:52:53 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 4 James Bowes 2010-04-28 21:19:33 UTC
*** Bug 586506 has been marked as a duplicate of this bug. ***

Comment 5 James Bowes 2010-04-29 14:57:09 UTC
*** Bug 578148 has been marked as a duplicate of this bug. ***

Comment 6 James Bowes 2010-04-29 14:59:30 UTC
On either subscribe by --product or --pool, if you already have a subscription to the product (or the product mapped to the pool you're subscribing to), you will get a nice message indicating so.

Note that this also means that the list of available products/pools will no longer include ones you already have subscriptions to.

Comment 7 wes hayutin 2010-05-03 15:36:00 UTC
this also looks good.. verified...
[root@iolo ~]# subscription-manager-cli register --user=wd --pass=asdf
f2a4d0ea-6e5e-4139-a3e9-4f41ee857b2b admin wd
[root@iolo ~]# subscription-manager-cli list --available
 	productName               	endDate                   	id         	quantity                  
------------------------------------------------------------------------------------------------------
	SPACEWALK-001             	Tue Jul 13 00:00:00 2010  	1          	20000                    
	monitoring                	Tue Jul 13 00:00:00 2010  	2          	20000                    
	provisioning              	Tue Jul 13 00:00:00 2010  	3          	20000                    
	virtualization_host       	Tue Jul 13 00:00:00 2010  	4          	20000                    
	virtualization_host_platform 	Tue Jul 13 00:00:00 2010  	5          	20000                    
[root@iolo ~]# subscription-manager-cli subscribe --help
Usage: subscription-manager-cli subscribe [OPTIONS]

subscribe

Options:
  -h, --help           show this help message and exit
  --debug=DEBUG        debug level
  --product=PRODUCT    product
  --regtoken=REGTOKEN  regtoken
  --pool=POOL          Subscription Pool Id
[root@iolo ~]# subscription-manager-cli subscribe --product=SPACEWALK-001
[root@iolo ~]# subscription-manager-cli list --consumed
 	Product Consumed 	activeSubscription 	endDate                   	startDate                 
----------------------------------------------------------------------------------------------------------------
[root@iolo ~]# subscription-manager-cli list --consumed
 	Product Consumed 	activeSubscription 	endDate                   	startDate                 
----------------------------------------------------------------------------------------------------------------
[root@iolo ~]# subscription-manager-cli list --available
 	productName               	endDate                   	id         	quantity                  
------------------------------------------------------------------------------------------------------
	monitoring                	Tue Jul 13 00:00:00 2010  	2          	20000                    
	provisioning              	Tue Jul 13 00:00:00 2010  	3          	20000                    
	virtualization_host       	Tue Jul 13 00:00:00 2010  	4          	20000                    
	virtualization_host_platform 	Tue Jul 13 00:00:00 2010  	5          	20000     
               
[root@iolo ~]# subscription-manager-cli subscribe --product=SPACEWALK-001
This consumer is already subscribed to the product 'SPACEWALK-001'
[root@iolo ~]# subscription-manager-cli subscribe --pool=1
This consumer is already subscribed to the product matching pool with id '1'
[root@iolo ~]#

Comment 8 John Sefler 2011-05-04 14:41:25 UTC
Group move of VERIFIED Candlepin component bugs to RELEASE_PENDING

Comment 11 Bryan Kearney 2018-12-10 15:37:07 UTC
I am closing out some old bugs from 2015. So, closing these out as current release. If this is still an issue for me, please reach out.


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