Bug 895447 - the count of subscriptions removed is zero,for the certs that have been imported
Summary: the count of subscriptions removed is zero,for the certs that have been imported
Keywords:
Status: CLOSED ERRATA
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: beta
: 5.10
Assignee: William Poteat
QA Contact: IDM QE LIST
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel510 rhsm-2013
TreeView+ depends on / blocked
 
Reported: 2013-01-15 09:01 UTC by Shwetha Kallesh
Modified: 2013-09-30 22:54 UTC (History)
7 users (show)

Fixed In Version: 1.8.2
Doc Type: Bug Fix
Doc Text:
No description necessary
Clone Of:
Environment:
Last Closed: 2013-09-30 22:54:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Remove the imported cert (76.08 KB, image/png)
2013-01-15 10:36 UTC, Shwetha Kallesh
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1332 0 normal SHIPPED_LIVE subscription-manager bug fix and enhancement update 2013-09-30 22:49:24 UTC

Description Shwetha Kallesh 2013-01-15 09:01:28 UTC
Description of problem:
the count of subscriptions removed is zero,for the certs that have been imported

Version-Release number of selected component (if applicable):
[root@rhel6 entitlement]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.7.23-1
subscription-manager: 1.8.0-1.git.118.3f0cf12.el6
python-rhsm: 1.8.0-1.git.17.030d4a7.el6


How reproducible:


Steps to Reproduce:
1.

[root@rhel6 entitlement]# ll
total 64
-rw-------. 1 root root 1679 Jan 15 14:13 1358516984651176517-key.pem
-rw-r--r--. 1 root root 2026 Jan 15 14:13 1358516984651176517.pem


[root@dhcp201-149 entitlement]# cat 1358516984651176517.pem >> cert.pem
[root@dhcp201-149 entitlement]# cat 1358516984651176517-key.pem >> cert.pem 
[root@dhcp201-149 entitlement]# mv cert.pem /root/
[root@dhcp201-149 entitlement]# subscription-manager remove --all
8 subscriptions removed from this system.
[root@dhcp201-149 entitlement]# subscription-manager import --cert /root/cert.pem 
Successfully imported certificate cert.pem

[root@rhel6 entitlement]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:         	Awesome OS Modifier Bits
Product ID:           	37080
Version:              	6.1
Arch:                 	ALL
Status:               	Subscribed
Starts:               	01/15/2013
Ends:                 	01/15/2014


[root@dhcp201-149 entitlement]# ll
total 8
-rw-r--r--. 1 root root 1678 Jan 15 19:53 2119222288078681200-key.pem
-rw-r--r--. 1 root root 2418 Jan 15 19:53 2119222288078681200.pem
[root@dhcp201-149 entitlement]# subscription-manager remove --all
0 subscriptions removed from this system.

2.
3.
  
Actual results:
0 subscriptions removed from this system.

Expected results:
1 subscriptions removed from this system.

Additional info:

Comment 2 Shwetha Kallesh 2013-01-15 10:36:43 UTC
Created attachment 678707 [details]
Remove the imported cert

Unsubscribing in GUI displays the dialogue seen in the attachment

Comment 3 Shwetha Kallesh 2013-01-15 10:44:02 UTC
[root@rhel6 ~]# subscription-manager import --cert /root/certv3.pem 
Successfully imported certificate certv3.pem
[root@rhel6 ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+

Subscription Name:    	Awesome OS Modifier
Provides:             	Awesome OS Modifier Bits
SKU:                  	awesomeos-modifier
Contract:             	0
Account:              	12331131231
Serial Number:        	1358516984651176517
Active:               	True
Quantity Used:        	1
Service Level:        	
Service Type:         	
Starts:               	01/15/2013
Ends:                 	01/15/2014

[root@rhel6 ~]# subscription-manager remove --serial 1358516984651176517
Unsuccessfully removed serial numbers:
   Entitlement Certificate with serial number 1358516984651176517 could not be found.

[root@rhel6 ~]# subscription-manager list --consumed
No consumed subscription pools to list

Comment 4 RHEL Program Management 2013-01-19 06:47:37 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 6 Bryan Kearney 2013-02-08 17:18:35 UTC
Fixed in the 1.8.2 version of subscription-manager or python-rhsm

Comment 7 Shwetha Kallesh 2013-02-11 09:01:01 UTC
Moving back to new,count is still zero.

[root@rhel7 ~]# cd /etc/pki/entitlement/
[root@rhel7 entitlement]# cat 454527879323979.pem >> /root/cert.pem
[root@rhel7 entitlement]# cat 454527879323979-key.pem  >> /root/cert.pem 

[root@rhel7 entitlement]# subscription-manager remove --all
1 subscription removed from this system.
Any local-only certificates have been deleted.

[root@rhel7 entitlement]# subscription-manager import --cert /root/cert.pem 
Successfully imported certificate cert.pem

[root@rhel7 entitlement]# subscription-manager remove --all
0 subscriptions removed from this system.
Any local-only certificates have been deleted.


Version:
[root@rhel7 entitlement]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.7.24-1
subscription-manager: 1.8.2-1.el7
python-rhsm: 1.8.2-1.el7

Comment 8 William Poteat 2013-03-05 13:05:41 UTC
master commit 580bd54165ead7ddf061d0d73dde1c8df9facfca

The counts are show as per what is deleted locally and what is deleted at the server.

Comment 9 Shwetha Kallesh 2013-03-13 09:10:39 UTC
Verifying version:
[root@rhel7 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.7.25-1
subscription-manager: 1.8.4-1.el7
python-rhsm: 1.8.7-1.el7

[root@rhel7 ~]# subscription-manager remove --all
0 subscriptions removed at the server.
[root@rhel7 ~]# subscription-manager import --cert /root/cert.pem 
Successfully imported certificate cert.pem
[root@rhel7 ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+

Subscription Name: RAM/Sockets Package (8GB)
Provides:          RAM Limiting Product
SKU:               ram-sockets-8gb
Contract:          139
Account:           12331131231
Serial Number:     454527879323979
Pool ID:           Not Available
Active:            True
Quantity Used:     1
Service Level:     
Service Type:      
Starts:            02/11/2013
Ends:              02/11/2014

[root@rhel7 ~]# subscription-manager remove --all
0 subscriptions removed at the server.
1 local certificate has been deleted

Comment 10 RHEL Program Management 2013-04-09 19:59:18 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 12 errata-xmlrpc 2013-09-30 22:54:33 UTC
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-1332.html


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