Bug 1000282

Summary: server type of subscription-manager identity after deleting the consumer registered with both RHSM and rhn classic should be just RHN Classic
Product: Red Hat Enterprise Linux 6 Reporter: Shwetha Kallesh <skallesh>
Component: subscription-managerAssignee: Devan Goodwin <dgoodwin>
Status: CLOSED WONTFIX QA Contact: John Sefler <jsefler>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.5CC: dgoodwin, jgalipea
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: 2013-08-28 12:31:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 862910    

Description Shwetha Kallesh 2013-08-23 05:59:24 UTC
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 12:24:13 UTC
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 12:31:37 UTC
Spoke to Shwetha, we're going to close, very low impact for a very short time.