Bug 856949

Summary: incorrect org name displayed when running command subscription-manager identity in RHEL 5.9 Workstation
Product: Red Hat Enterprise Linux 5 Reporter: gaoshang <sgao>
Component: subscription-managerAssignee: candlepin-bugs
Status: CLOSED NOTABUG QA Contact: Entitlement Bugs <entitlement-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.9CC: bkearney, liliu
Target Milestone: rcKeywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-09-20 12:07:34 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: 771748    

Description gaoshang 2012-09-13 08:25:08 UTC
Description of problem:
when running command subscription-manager identity on RHEL 5.9 workstation x86_64/i386, org name displayed incorrectly - it shows the org id instead of the org name.

Version-Release number of selected component (if applicable):
subscription-manager-gui-1.0.17-1.el5
subscription-manager-firstboot-1.0.17-1.el5
subscription-manager-1.0.17-1.el5
python-rhsm-1.0.6-1.el5

How reproducible:
always

Steps to Reproduce:
1. Register system to candlepin
2. Run command subscription-manager identity
  
Actual results:
The output of above step 2 shows the org name as below which is the same as the org id:
org name: 6655649
org id: 6655649

Expected results:
The output of above step 2 should show org name/id as below:
org name: stage_test_27 User
org id: 6655649

Additional info:
In subscription-manager-gui, click view System Facts through System menu, the organization displayed in Subscription Manager - Facts page also shows the org id instead of the org name.

Comment 1 gaoshang 2012-09-13 08:49:17 UTC
This bug can be reproduced only in RHEL 5.9 Workstation i386/x86_64. RHEL 5.9 client and RHEL 5.9 server have not this issue.

Comment 2 RHEL Program Management 2012-09-13 08:59:04 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.

Comment 3 Bryan Kearney 2012-09-17 18:52:23 UTC
Per 852001 the id is now showing the key which can beused in the URL. For hosted, this is the same as the name. For other tooling, this is not the case.

Comment 7 Bryan Kearney 2012-09-19 20:33:47 UTC
Here is the data for 27:

{"created":"2012-07-12T20:43:02.000+0000","updated":"2012-07-12T20:43:02.000+0000","parentOwner":null,"id":"8a99f983387c4cd501387cee35880a30","key":"6655649","displayName":"","contentPrefix":null,"defaultServiceLevel":null,"upstreamUuid":null,"href":"/owners/6655649"}'

Note, name should be 

6655649

and key should be

6655649


The code is accurate, the data is not set up consistently

Comment 8 gaoshang 2012-09-20 04:14:30 UTC
By comparing the following 2 user's creation data, I think the "displayName" filed for user stage_test_27 should be: "displayName":"stage_test_27 User", it should not be just blank.

By the way, why org name is 6655649 when the "displayName" filed is blank in the creation data of the user stage_test_27?


stage_test_12 creation data ==>

{"created":"2012-07-12T01:22:50.000+0000","updated":"2012-07-12T01:22:50.000+0000","parentOwner":null,"id":"8a99f9843870e1dc013878c802e13e37","key":"6655634","displayName":"stage_test_12 User","contentPrefix":null,"defaultServiceLevel":null,"upstreamUuid":null,"href":"/owners/6655634"}'

stage_test_27 creation data ==>

{"created":"2012-07-12T20:43:02.000+0000","updated":"2012-07-12T20:43:02.000+0000","parentOwner":null,"id":"8a99f983387c4cd501387cee35880a30","key":"6655649","displayName":"","contentPrefix":null,"defaultServiceLevel":null,"upstreamUuid":null,"href":"/owners/6655649"}'

Comment 9 Bryan Kearney 2012-09-20 12:07:34 UTC
I am seeing this today:

{'content': '{"created":"2012-07-12T20:43:02.000+0000","updated":"2012-07-12T20:43:02.000+0000","parentOwner":null,"id":"8a99f983387c4cd501387cee35880a30","key":"6655649","displayName":"6655649","contentPrefix":null,"defaultServiceLevel":null,"upstreamUuid":null,"href":"/owners/6655649"}', 'status': 200}
Current identity is: 4397e12f-7d9e-4b8d-b30e-db32ddfbb96a
name: bkearney
org name: 6655649
org id: 6655649


Again, I believt this code is fine.