Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 588380 - Inconsistent behavior, list --available w/ stand alone candlepin
Inconsistent behavior, list --available w/ stand alone candlepin
Status: CLOSED NOTABUG
Product: Candlepin
Classification: Community
Component: candlepin (Show other bugs)
0.5
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bryan Kearney
wes hayutin
:
Depends On:
Blocks: 743405
  Show dependency treegraph
 
Reported: 2010-05-03 11:47 EDT by wes hayutin
Modified: 2015-05-14 11:22 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-07-12 15:51:21 EDT
Type: ---
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 wes hayutin 2010-05-03 11:47:52 EDT
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 11:52:35 EDT
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 07:35:31 EDT
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.