Bug 1000282 - server type of subscription-manager identity after deleting the consumer registered with both RHSM and rhn classic should be just RHN Classic
server type of subscription-manager identity after deleting the consumer regi...
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager (Show other bugs)
6.5
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Devan Goodwin
John Sefler
:
Depends On:
Blocks: rhsm-rhel65
  Show dependency treegraph
 
Reported: 2013-08-23 01:59 EDT by Shwetha Kallesh
Modified: 2013-08-28 08:31 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-28 08:31:37 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Shwetha Kallesh 2013-08-23 01:59:24 EDT
Description of problem:
server type of subscription-manager identity after deleting the consumer registered with both RHSM and rhn classic should be just RHN Classic 

Version-Release number of selected component (if applicable):
[root@rhel65 ~]# subscription-manager version
server type: RHN Classic
subscription management server: 0.8.19-1
subscription-manager: 1.10.0-1.git.11.3283e12.el6
python-rhsm: 1.10.0-1.git.4.e274ed7.el6


How reproducible:


Steps to Reproduce:
[root@rhel65 ~]# subscription-manager register --org=admin
WARNING

This system has already been registered with Red Hat using RHN Classic.

Your system is being registered again using Red Hat Subscription Management. Red Hat recommends that customers only register once.

To learn how to unregister from either service please consult this Knowledge Base Article: https://access.redhat.com/kb/docs/DOC-45563
Username: admin
Password: 
The system has been registered with ID: d1c66405-3a71-4ae8-9072-5fc85584b752
 
[root@rhel65 ~]# curl -k -u admin:admin --request DELETE https://10.70.35.34:8443/candlepin/consumers/d1c66405-3a71-4ae8-9072-5fc85584b752
[root@rhel65 ~]# subscription-manager identity
server type: RHN Classic and Red Hat Subscription Management
Unit d1c66405-3a71-4ae8-9072-5fc85584b752 has been deleted
[root@rhel65 ~]# subscription-manager identity
server type: RHN Classic and Red Hat Subscription Management
Unit d1c66405-3a71-4ae8-9072-5fc85584b752 has been deleted


Actual results:
server type: RHN Classic and Red Hat Subscription Management
Unit d1c66405-3a71-4ae8-9072-5fc85584b752 has been deleted

Expected results:

server type: RHN Classic
Unit d1c66405-3a71-4ae8-9072-5fc85584b752 has been deleted

Additional info:
Comment 2 Devan Goodwin 2013-08-28 08:24:13 EDT
Proposing that we skip this fix. The problem will correct itself the next time rhsmcertd runs (every 4 hours by default) and the identity certificate is archived.

I would fix if it were simple but the problem exists in several other places where we assume we're registered if an identity certificate exists, this is done in hundreds of places in subscription manager. The error message that the consumer is deleted is done in our exception handling code for the period of time between deletion and when rhsmcertd runs on client. 

Fixing is hampered by the fact that the code which looks up the server version and type does not require any authentication, thus there is no GoneException to be thrown because we do not authenticate as a consumer for this part. Only later in identity command do we try to lookup owner info which triggers the gone. So to fix we would have to combine two things that should not really be combined and start forcing authentication for something that doesn't need it.

Overall feels like not worth fixing considering it's consistent with rest of app, and corrects itself once rhsmcertd runs. Sound ok?
Comment 3 Devan Goodwin 2013-08-28 08:31:37 EDT
Spoke to Shwetha, we're going to close, very low impact for a very short time.

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