Bug 986292 - Displaying wrong count of local certificates when removing a subscription
Summary: Displaying wrong count of local certificates when removing a subscription
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager
Version: 5.10
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: candlepin-bugs
QA Contact: IDM QE LIST
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel510
TreeView+ depends on / blocked
 
Reported: 2013-07-19 10:51 UTC by Rehana
Modified: 2013-07-22 15:38 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-07-22 15:38:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Rehana 2013-07-19 10:51:10 UTC
Description of problem:
When removing certain subscriptions observed that the no.of local certificates get removed is displayed wrongly

Version-Release number of selected component (if applicable):
[root@localhost facts]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.8.17-1
subscription-manager: 1.8.13-1.el5_9
python-rhsm: 1.8.13-1.el5_9


How reproducible:
2/4

Steps to Reproduce:
1.consumed list 
[root@localhost facts]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name: Awesome OS Instance Based (Standard Support)
Provides:          Awesome OS Instance Server Bits
SKU:               awesomeos-instancebased
Contract:          42
Account:           12331131231
Serial:            5756941374585920113
Pool ID:           8ac6a3f83ff5b63f013ff5b760060846
Active:            True
Quantity Used:     1
Service Level:     Standard
Service Type:      L1-L3
Status Details:    
Starts:            07/19/2013
Ends:              07/19/2014

Subscription Name: Multi-Attribute (non-stackable) (6 cores, 8GB)
Provides:          Multi-Attribute Limited Product
SKU:               non-stacked-6core8ram-multiattr
Contract:          234
Account:           12331131231
Serial:            8060108718597150335
Pool ID:           8ac6a3f83ff5b63f013ff5b7559a046f
Active:            True
Quantity Used:     1
Service Level:     Super
Service Type:      Level 3
Status Details:    
Starts:            07/19/2013
Ends:              07/19/2014

Subscription Name: Awesome OS Server Basic (dc-virt)
Provides:          Awesome OS Server Bits
SKU:               awesomeos-server-basic-vdc
Contract:          18
Account:           12331131231
Serial:            1494812855684809205
Pool ID:           8ac6a3f83ff5b63f013ff6546ed016fd
Active:            True
Quantity Used:     1
Service Level:     Full-Service
Service Type:      Drive-Through
Status Details:    
Starts:            07/19/2013
Ends:              07/19/2014

Subscription Name: Awesome OS Modifier
Provides:          Awesome OS Modifier Bits
SKU:               awesomeos-modifier
Contract:          0
Account:           12331131231
Serial:            7116474575512286699
Pool ID:           8ac6a3f83ff5b63f013ff5b762be0989
Active:            True
Quantity Used:     1
Service Level:     
Service Type:      
Status Details:    
Starts:            07/19/2013
Ends:              07/19/2014

2.Removing data center sub-pool subscription

[root@localhost facts]# subscription-manager remove --serial 1494812855684809205
Serial numbers successfully removed at the server:
   1494812855684809205
2 local certificates have been deleted.


Actual results:
Displayed "2 local certificates have been deleted." , when only 1 serial number is given

Expected results:
should display "1 local certificates have been deleted"

Additional info:
Having multiple products and subscriptions in the system, will help reproducing this bug easier

Comment 1 RHEL Program Management 2013-07-19 11:18:59 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.

Comment 2 Carter Kozak 2013-07-22 15:38:27 UTC
This is working as intended.  This happens because there is a modifier subscription installed, and the modified subscription is removed (which means we must remove the modifier as well)
The modifier subscription is actually replaced.  If you list --consumed afterward, you'll notice that the serial has changed.

[root@ckozak-desktop ckozak]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name: Awesome OS Server Basic
Provides:          Awesome OS Server Bits
SKU:               awesomeos-server-basic
Contract:          13
Account:           12331131231
Serial:            4239246919217791088
Pool ID:           ff8080813ff291c6013ff292e5990442
Active:            True
Quantity Used:     1
Service Level:     None
Service Type:      Self-Support
Status Details:    
Starts:            07/17/2013
Ends:              07/17/2014

Subscription Name: Awesome OS Modifier
Provides:          Awesome OS Modifier Bits
SKU:               awesomeos-modifier
Contract:          1
Account:           12331131231
Serial:            4280917935826958276
Pool ID:           ff8080813ff291c6013ff292e52f03f5
Active:            True
Quantity Used:     1
Service Level:     
Service Type:      
Status Details:    
Starts:            07/17/2013
Ends:              07/17/2014

[root@ckozak-desktop ckozak]# subscription-manager remove --serial 4239246919217791088
Serial numbers successfully removed at the server:
   4239246919217791088
deleting ff8080814006a36c01400702a7c800e1
deleting ff8080814006a36c014007032ad100e4
2 local certificates have been deleted.

[root@ckozak-desktop ckozak]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name: Awesome OS Modifier
Provides:          Awesome OS Modifier Bits
SKU:               awesomeos-modifier
Contract:          1
Account:           12331131231
Serial:            5168308126033982552
Pool ID:           ff8080813ff291c6013ff292e52f03f5
Active:            True
Quantity Used:     1
Service Level:     
Service Type:      
Status Details:    
Starts:            07/17/2013
Ends:              07/17/2014


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