Bug 697908

Summary: regression in subscription-manager unregister
Product: Red Hat Enterprise Linux 5 Reporter: John Sefler <jsefler>
Component: subscription-managerAssignee: Chris Duryee <cduryee>
Status: CLOSED ERRATA QA Contact: J.C. Molet <jmolet>
Severity: high Docs Contact:
Priority: unspecified    
Version: 5.7CC: jmolet, spandey
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-21 08:45:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 675214    

Description John Sefler 2011-04-19 15:53:02 UTC
Description of problem:
On rhel6, running subscription-manager unregister returns an exit code of 0 when the system is previously registered and 1 when the system is already unregistered.  In today's build of sm on rhel57, an exit code of 255 is being returned.  This is causing many automated tests to fail.


Version-Release number of selected component (if applicable):
subscription-manager-0.95.5.8-1.git.0.356db80.el5


How reproducible:


Steps to Reproduce:
1. subscription-manager unregister
2.
3.
  
Actual results:
exit code = 255

Expected results:
exit code of 0 or 1

Additional info:

Comment 1 Chris Duryee 2011-04-19 20:38:47 UTC
Fixed on RHEL5.7 branch in 3d40137a03af85ca22f4271ebbe6f97c3715b9a0, version 0.95.5.9

Comment 2 Chris Duryee 2011-04-19 20:39:20 UTC
Fixed on master branch in af8b8a734321bf1f95054b5dbe566a81fedfc450, version 0.96.2

Comment 3 J.C. Molet 2011-04-20 13:58:26 UTC
[root@jmolet-57server scratch]# subscription-manager register 
WARNING

You have already registered with RHN using RHN Classic technology. This tool requires registration using RHN Certificate-Based Entitlement technology.

Except for a few cases, Red Hat recommends customers only register with RHN once.

For more information, including alternate tools, consult this Knowledge Base Article: https://access.redhat.com/kb/docs/DOC-45563

Username: testuser1
Password: 
4800b95e-4443-4b37-a6c1-7abe229f3802 jmolet-57server.usersys.redhat.com
[root@jmolet-57server scratch]# echo $?
0
[root@jmolet-57server scratch]# subscription-manager unregister
System has been un-registered.
[root@jmolet-57server scratch]# echo $?
0
[root@jmolet-57server scratch]# subscription-manager unregister
This system is currently not registered.
[root@jmolet-57server scratch]# echo $?
1
[root@jmolet-57server scratch]# rpm -qa | grep subscription
subscription-manager-gnome-0.95.5.8-1.git.2.3d40137.el5
subscription-manager-firstboot-0.95.5.8-1.git.2.3d40137.el5
subscription-manager-0.95.5.8-1.git.2.3d40137.el5

This is tested as working.  Marking VERIFIED.

Comment 4 errata-xmlrpc 2011-07-21 08:45:47 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2011-1078.html

Comment 5 errata-xmlrpc 2011-07-21 12:30:14 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2011-1078.html