Bug 867766 - [RFE] unsubscribe from multiple entitlement certificates using serial numbers
[RFE] unsubscribe from multiple entitlement certificates using serial numbers
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager (Show other bugs)
6.4
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: William Poteat
IDM QE LIST
: FutureFeature
Depends On:
Blocks: 771481
  Show dependency treegraph
 
Reported: 2012-10-18 05:16 EDT by Shwetha Kallesh
Modified: 2013-02-21 03:59 EST (History)
6 users (show)

See Also:
Fixed In Version: subscription-manager-1.1.4-1
Doc Type: Release Note
Doc Text:
Subscribe or Unsubscribe Multiple Entitlements Subscription Manager is now able to subscribe (attach) or unsubscribe (remove) multiple entitlements using their serial numbers at once.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 03:59:10 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 Shwetha Kallesh 2012-10-18 05:16:23 EDT
Description of problem:
unsubscribe from multiple entitlement certificates using serial number is not working 

Version-Release number of selected component (if applicable):
[root@localhost ~]# subscription-manager version
registered to: 0.7.15-1
server type: subscription management service
subscription-manager: 1.0.23-1.el5
python-rhsm: 1.0.10-1.el5


How reproducible:


Steps to Reproduce:
1.[root@localhost ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+

Subscription Name:    	Management Add-On
Provides:             	
SKU:                  	management-100
Contract:             	121
Account:              	12331131231
Serial Number:        	6944161005960962792
Active:               	True
Quantity Used:        	1
Service Level:        	
Service Type:         	
Starts:               	10/17/2012
Ends:                 	10/17/2013

Subscription Name:    	Shared File System
Provides:             	Shared File System Bits
SKU:                  	sfs
Contract:             	127
Account:              	12331131231
Serial Number:        	183734893740675929
Active:               	True
Quantity Used:        	1
Service Level:        	Layered
Service Type:         	
Starts:               	10/17/2012
Ends:                 	10/17/2013

[root@localhost ~]# subscription-manager unsubscribe --serial 6944161005960962792 --serial 183734893740675929
This machine has been unsubscribed from subscription with serial number 183734893740675929
[root@localhost ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+

Subscription Name:    	Management Add-On
Provides:             	
SKU:                  	management-100
Contract:             	121
Account:              	12331131231
Serial Number:        	6944161005960962792
Active:               	True
Quantity Used:        	1
Service Level:        	
Service Type:         	
Starts:               	10/17/2012
Ends:                 	10/17/2013

[root@localhost ~]# 

2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 John Sefler 2012-10-18 08:18:55 EDT
Multiple serial unsubscribe has never worked in any release of subscription-manager.

Prefixing the summary with [RFE] (request for enhancement) and moving to rhel64.
Comment 3 Adrian Likins 2012-11-08 17:41:44 EST
commit 11b1e71ca92b9c4460e757cd41d8602b722d0f6c
Author: William Poteat <wpoteat@redhat.com>
Date:   Mon Oct 29 10:55:54 2012 -0400

    867766: Unsubscribe from multiple entitlement certificates using serial numbers
Comment 5 John Sefler 2012-11-17 14:35:58 EST
Verifying Version...
[root@jsefler-6 ~]# rpm -q subscription-manager
subscription-manager-1.1.9-1.el6.x86_64


[root@jsefler-6 ~]# subscription-manager register --username testuser1 --org admin --serverurl jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin
Password: 
The system has been registered with id: 1f5b090e-ecb6-47d7-98be-fe1dc71a3eb3 
[root@jsefler-6 ~]# subscription-manager list --available | grep "Pool Id" | head -5
Pool Id:              	8a90f8633b065022013b065250f10238
Pool Id:              	8a90f8633b065022013b065251be0254
Pool Id:              	8a90f8633b065022013b065252660274
Pool Id:              	8a90f8633b065022013b0652529f0280
Pool Id:              	8a90f8633b065022013b065253700299
[root@jsefler-6 ~]# subscription-manager attach --pool 8a90f8633b065022013b065250f10238 --pool 8a90f8633b065022013b065251be0254 --pool 8a90f8633b065022013b065252660274 --pool 123 --pool 8a90f8633b065022013b0652529f0280 --pool 8a90f8633b065022013b065253700299
Successfully attached a subscription for: Awesome OS Modifier
Successfully attached a subscription for: Awesome OS Server Bundled
Successfully attached a subscription for: Awesome OS Server Basic
Subscription pool 123 does not exist.
Successfully attached a subscription for: Awesome OS Server Basic
Successfully attached a subscription for: Awesome OS Server Basic (multi-entitlement)
[root@jsefler-6 ~]# subscription-manager list --consumed | grep Serial
Serial Number:        	4722641468628458003
Serial Number:        	5057817775346836217
Serial Number:        	6673005787671302538
Serial Number:        	8971015588825471492
Serial Number:        	4090663950057123044
[root@jsefler-6 ~]# subscription-manager remove --serial 4722641468628458003 --serial 5057817775346836217 --serial 6673005787671302538 --serial 123 --serial 8971015588825471492 --serial 4090663950057123044
Successfully removed serial numbers:
   4722641468628458003
   5057817775346836217
   6673005787671302538
   8971015588825471492
   4090663950057123044
Unsuccessfully removed serial numbers:
   Entitlement Certificate with serial number 123 could not be found.
[root@jsefler-6 ~]# 


VERIFIED: subscriptions can now be unsubscribed/removed in multiplicity (as well as subscribed/attached)
Comment 7 errata-xmlrpc 2013-02-21 03:59:10 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0350.html

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