Bug 773523 - [ALL LANG] [RHSM CLI] unsubscribe module Unsubscribe with the same or wrong SerialNumber produces traceback "UnicodeEncodeError : 'ascii' codec can't encode characters ..."
[ALL LANG] [RHSM CLI] unsubscribe module Unsubscribe with the same or wrong S...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager (Show other bugs)
5.8
Unspecified Linux
unspecified Severity high
: rc
: ---
Assigned To: William Poteat
IDM QE LIST
: i18n
Depends On:
Blocks: 771748
  Show dependency treegraph
 
Reported: 2012-01-12 01:41 EST by Lijun Li
Modified: 2013-01-09 12:45 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-01-09 12:45:51 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Unsubscribe with the same or wrong SerialNumber produces traceback (71.85 KB, image/png)
2012-01-12 01:48 EST, Lijun Li
no flags Details

  None (edit)
Description Lijun Li 2012-01-12 01:41:42 EST
Description of problem:
Unsubscribe with the same or wrong SerialNumber produces traceback. 

Version-Release number of selected component (if applicable):
subscription-manager-0.98.10-1.el5


How reproducible:
100%

Steps to Reproduce:
1. Install rhel5.8 snapshot-3 OS build via
http://download.englab.nay.redhat.com/pub/rhel/rel-eng/RHEL5.8-Server-20120105.0/5/i386/os/
3.(Run the command when the system IS registered)

(Subscribe by 'sudo subscription-manager subscribe --auto' and run 'LANG=en_US subscription-manager list --consumed | grep SerialNumber' to get SerialNumber)


$ sudo subscription-manager unsubscribe --serial=SerialNumber

(Run the command again with same SerialNumber or wrong SerialNumber )

$ sudo subscription-manager unsubscribe --serial=SerialNumber

$ sudo subscription-manager unsubscribe --serial=wrong_SerialNumber

 
Actual results:
Unsubscribe with the same or wrong SerialNumber produces traceback. 


Expected results:
Should no traceback.

Additional info:
Comment 1 Lijun Li 2012-01-12 01:48:13 EST
Created attachment 552320 [details]
Unsubscribe with the same or wrong SerialNumber produces traceback
Comment 3 J.C. Molet 2012-06-25 07:57:44 EDT
Testing with versions: 
python-rhsm-1.0.2-1.git.2.d5c3d05.el5
subscription-manager-1.0.4-1.git.20.0466bff.el5


[root@jmolet-vm0 ~]# subscription-manager clean
All local data removed
[root@jmolet-vm0 ~]# subscription-manager register --user testuser1 --pass password --org admin
The system has been registered with id: 509d3da3-075c-4ae0-9764-ff1b2b77ea02 

[root@jmolet-vm0 ~]# subscription-manager subscribe --pool=8a90f88f3822acb3013822ad737c045d
Successfully consumed a subscription for: Awesome OS with up to 4 virtual guests
[root@jmolet-vm0 ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Product Subscriptions
+-------------------------------------------+

Subscription Name:    	Awesome OS with up to 4 virtual guests
Provides:             	Awesome OS Server Bits
Contract:             	102
Account:              	12331131231
Serial Number:        	6210426182685478055
Active:               	True
Quantity Used:        	1
Service Level:        	None
Service Type:         	None
Starts:               	06/24/2012
Ends:                 	06/24/2013

[root@jmolet-vm0 ~]# subscription-manager unsubscribe --serial=6210426182685478055
This machine has been unsubscribed from subscription with serial number 6210426182685478055
[root@jmolet-vm0 ~]# subscription-manager unsubscribe --serial=6210426182685478055
Entitlement Certificate with serial number 6210426182685478055 could not be found.
[root@jmolet-vm0 ~]# subscription-manager unsubscribe --serial=6210426182685478055456666
6210426182685478055456666 is not a valid value for serial
[root@jmolet-vm0 ~]# subscription-manager unsubscribe --serial=621042618268547805A
Error: '621042618268547805A' is not a valid serial number
[root@jmolet-vm0 ~]# subscription-manager unsubscribe --serial=621042618268000000
Entitlement Certificate with serial number 621042618268000000 could not be found.
[root@jmolet-vm0 ~]# 


Cannot repro this bug as of the latest versions.  Marking VERIFIED.
Comment 4 Bryan Kearney 2013-01-09 12:45:51 EST
Batch change of verified bugs which must have missed making the errata.

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