Bug 584427 - RHSM GUI Re-register Does Not Successfully Unregister First
Summary: RHSM GUI Re-register Does Not Successfully Unregister First
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Candlepin
Classification: Community
Component: candlepin (Show other bugs)
(Show other bugs)
Version: 0.5
Hardware: All Linux
low
high
Target Milestone: ---
: ---
Assignee: Pradeep Kilambi
QA Contact: Jeff Weiss
URL:
Whiteboard:
Keywords: QA-Closed
Depends On:
Blocks: ent2
TreeView+ depends on / blocked
 
Reported: 2010-04-21 14:58 UTC by Devan Goodwin
Modified: 2015-05-14 15:31 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-05-04 14:47:54 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Devan Goodwin 2010-04-21 14:58:08 UTC
Description of problem:

When using the RHSM gui to switch to a new account, unregister fails silently with just a log.error, no stack trace, and no indication of the problem in the GUI. The old consumer continues to exist and is still consuming all their entitlements.

Version-Release number of selected component (if applicable):

subscription-manager-gnome-0.39-1.git.62ce51309d90d8266d341644d7f4451e34fb05da.fc12.i686

How reproducible:

100%

Steps to Reproduce:
1. Register with GUI.
2. Consume an entitlement, note the resulting pool count in the Add screen.
3. Reopen register screen and change account, but use the same credentials.

  
Actual results:

rhsm.log entry: Unable to unregister existing user credentials.

Revisiting add dialog, the pool count was not incremented, as the old consumer still exists and has entitlements.

Expected results:

Log message should include stack trace details. In this case the error is actually a 403 Forbidden.

GUI should receive some notification of the issue.

Unregister should be functional, pool should have entitlements returned.



Additional info:

I believe the unregister issue is related to the use of the global UEP variable in managergui.py. It is declared global and initialized at the start of the module. It is also however re-initialized every time the RegisterScreen is opened, only in this case no authentication or identity certs are used, thus the 403 Forbidden. I *think* in this case you probably want to use the existing identity certificate for the unregister, then it can be safely discarded.

As a side note, CLI unregister is doing a rm of /etc/pki/consumer, other calls to unregister do not seem to do this. Might be a potential fork in behavior that could cause confusion someday.

Comment 1 Steve Salevan 2010-04-21 20:27:10 UTC
A TCMS case has been created for the above issue:

https://tcms.engineering.redhat.com/case/46574/

Comment 2 spandey 2010-05-25 06:14:19 UTC
I am able to repro this issue using following setup

candlepin : statler.usersys.redhat.com
Client : rhel 6 Host (10.65.193.78)
Sm version : 60 

How reproducible 
100%
steps to repro : 
1. Register with GUI.
2. Consume an entitlement, note the resulting pool count in the Add screen.
3. Reopen register screen and change account, but use the same credentials.



Actual Result : 
Pool count not incremented after unregister 

rhsm.log displays 

2010-05-25 16:45:20,271 [INFO] loadAccountSettings() @managergui.py:118 - Machine already registered, loading the re-registration/registration token

2010-05-25 16:45:21,767 [INFO] setUp() @connection.py:110 - Connection Established for cli: Host: statler.usersys.redhat.com, Port: 8443, handler: /candlepin

2010-05-25 16:45:28,521 [ERROR] onRegisterAction() @managergui.py:312 - Unable to unregister existing user credentials.

2010-05-25 16:45:30,939 [INFO] persist_consumer_cert() @managerlib.py:45 - Consumer created:{'consumer_name': 'admin', 'uuid': '64dbad35-c92b-48b6-8f44-cb8f49f782de', 'user_account': 'admin'}

Comment 4 wes hayutin 2010-08-10 16:23:57 UTC
Jeff, this is an old bug, but please check it out. Thank you!

Comment 5 Jeff Weiss 2010-08-10 16:58:55 UTC
When I re-register as the same user, I see 10 available in the pool, which is how many there were just after I first registered.  This is the expected behavior, verified.
Commit 4a5305968e771b18bc0db804d323ce1f83c10176

Comment 6 John Sefler 2011-05-04 14:47:54 UTC
Group move of VERIFIED Entitlement/'client tools' component bugs to CLOSED CURRENT_RELEASE since these bugs have already been included in Alpha and Beta releases for Entitlements.

Going forward, the RHEL/subscription-manager component is a better classification for these types of bugs.


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