Bug 773523 - [ALL LANG] [RHSM CLI] unsubscribe module Unsubscribe with the same or wrong SerialNumber produces traceback "UnicodeEncodeError : 'ascii' codec can't encode characters ..."
Summary: [ALL LANG] [RHSM CLI] unsubscribe module Unsubscribe with the same or wrong S...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager
Version: 5.8
Hardware: Unspecified
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: William Poteat
QA Contact: IDM QE LIST
URL:
Whiteboard:
Depends On:
Blocks: 771748
TreeView+ depends on / blocked
 
Reported: 2012-01-12 06:41 UTC by Lijun Li
Modified: 2013-01-09 17:45 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-09 17:45:51 UTC
Target Upstream Version:
Embargoed:


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

Description Lijun Li 2012-01-12 06:41:42 UTC
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 06:48:13 UTC
Created attachment 552320 [details]
Unsubscribe with the same or wrong SerialNumber produces traceback

Comment 3 J.C. Molet 2012-06-25 11:57:44 UTC
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 17:45:51 UTC
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.