Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 588380 - Inconsistent behavior, list --available w/ stand alone candlepin
Summary: Inconsistent behavior, list --available w/ stand alone candlepin
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Candlepin
Classification: Community
Component: candlepin
Version: 0.5
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Bryan Kearney
QA Contact: wes hayutin
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-05-03 15:47 UTC by wes hayutin
Modified: 2015-05-14 15:22 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-07-12 19:51:21 UTC


Attachments (Terms of Use)

Description wes hayutin 2010-05-03 15:47:52 UTC
Description of problem:

So, I verified that a customer is no longer able to register to the same product by product name or pool id. However after a customer subscribes, the product is totally removed from the list. In the example below the SPACEWALK product has been removed from the list.  This may be as designed.

If the design is to remove a subscribed product from the --available list, I think we should also remove the quantity column.  If you can only subscribe once, than you dont need a quantity the assumption would be if the product is listed you have at least > 1.  

I can also see a valid case for listing the subscribed product and decrement the entitlement count.

[root@iolo ~]# subscription-manager-cli register --user=wd --pass=asdf
84b649c7-1a15-40ad-94e7-0bd71c9c5b9a admin wd
[root@iolo ~]# subscription-manager-cli list --available
Peer certificate commonName does not match host, expected statler.usersys.redhat.com, got XX
[root@iolo ~]# rm -Rf /etc/pki/consumer/
cert.pem  key.pem   
[root@iolo ~]# rm -Rf /etc/pki/consumer/*
[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 ~]# 
[root@iolo ~]# 
[root@iolo ~]# 
[root@iolo ~]# 
[root@iolo ~]# 
[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

Comment 1 wes hayutin 2010-05-03 15:52:35 UTC
candlepin 
commit 1c6c7139f470b2139d05a5b1aee4b3074aa5aa93

subscription-manager-0.48-1.el6.i686
[root@iolo ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux release 6.0 Beta (Santiago)
[root@iolo ~]# uname -a
Linux iolo.rdu.redhat.com 2.6.32-19.el6.i686 #1 SMP Tue Mar 9 18:10:40 EST 2010 i686 i686 i386 GNU/Linux

Comment 2 James Bowes 2010-05-06 11:35:31 UTC
Yeah, this is as designed. Not sure about dropping the quantity column though, as some products may allow you to subscribe more than once (just nothing we have set up yet).

This could also be a poor design choice, and we might want to bring back listing all relevant products for a consumer, subscribed or not.


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