Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1059900 - rhc fails to display correct information
rhc fails to display correct information
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
2.0.0
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Brenton Leanhardt
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-01-30 16:46 EST by saurabh sharma
Modified: 2017-03-08 12 EST (History)
9 users (show)

See Also:
Fixed In Version: rhc-1.17.5.1-1.el6op
Doc Type: Bug Fix
Doc Text:
The OpenShift Enterprise client tools depended on the Ruby method Array#sort_by!, which is not implemented in Ruby 1.8.7, causing an error when attempts were made to generate the domain members list. This bug fix updates the client tools to use the Ruby method Array#sort_by, which is defined in Ruby 1.8.7, and errors no longer occur when generating the domain members list.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-02-25 10:44:20 EST
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)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:0209 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.0.3 bugfix and enhancement update 2014-02-25 15:40:32 EST

  None (edit)
Description saurabh sharma 2014-01-30 16:46:05 EST
Description of problem:
rhc shows <error> for member information after editing members

Version-Release number of selected component (if applicable):
rhc 1.18.2
OSE 2.0

How reproducible:
Always

Steps to Reproduce:
1.Create a domain and add members to it (edit/admin/view)
2.Modify the members list (add/remove members)
3.Issue "rhc domain show"

Actual results:
shows error for "members" field

Expected results:
show member (role) information

Additional info:
REST call via curl for member listing works.
Comment 2 Luke Meyer 2014-01-30 17:26:07 EST
Can you attach the JSON that was output from the member list REST API call? Also, you had a line of code that sorted the members which, if removed, prevented the error. Could you attach/paste that diff too?
Comment 3 saurabh sharma 2014-01-30 21:14:54 EST
On file "/usr/lib/ruby/gems/1.8/gems/rhc-1.18.2/lib/rhc/rest/membership.rb"
If i comment the line #64
 arr.sort_by!(&:name)

It works and i can see that along with User (role) some other fields are also populated.


I will update the JSON shortly as i have reset the openshift installation.
Comment 4 saurabh sharma 2014-01-31 15:55:39 EST
I am now seeing this not only during modify but all the time with rhc 1.8. Someone else connecting to the same server (on a different version of rhc) can see the members via rhc

Here is the json output:

{"api_version":1.6,"data":[{"explicit_role":null,"from":[{"type":"owner","role":"admin"}],"id":"52eb34b04ce738b740000001","login":"laeestore28.gen","owner":true,"role":"admin","type":"user"},{"explicit_role":"admin","id":"52eaeb164ce738c46a000001","login":"apriydar","owner":false,"role":"admin","type":"user"},{"explicit_role":"admin","id":"52eb25584ce73882f9000001","login":"arunp","owner":false,"role":"admin","type":"user"},{"explicit_role":"admin","id":"52eb254f4ce738fda9000001","login":"kannagov","owner":false,"role":"admin","type":"user"},{"explicit_role":"admin","id":"52eb25614ce7388605000001","login":"kikarki","owner":false,"role":"admin","type":"user"},{"explicit_role":"admin","id":"52eaf9c74ce738df69000002","login":"micwhite","owner":false,"role":"admin","type":"user"},{"explicit_role":"admin","id":"52eb24684ce738d759000003","login":"pvanamal","owner":false,"role":"admin","type":"user"},{"explicit_role":"admin","id":"52eb066e4ce73897ae000001","login":"sasharm4","owner":false,"role":"admin","type":"user"},{"explicit_role":"admin","id":"52eb223c4ce738d759000001","login":"sbandlag","owner":false,"role":"admin","type":"user"},{"explicit_role":"admin","id":"52eb0e124ce7384492000001","login":"skotaru","owner":false,"role":"admin","type":"user"},{"explicit_role":"admin","id":"52eb25884ce738972a000001","login":"slingama","owner":false,"role":"admin","type":"user"}],"messages":[{"exit_code":0,"field":null,"index":null,"severity":"info","text":"Found 11 members."}],"status":"ok","supported_api_versions":[1.0,1.1,1.2,1.3,1.4,1.5,1.6],"type":"members","version":"1.6"}



____________



this is what the rhc shows: 

 Members:            <error>
Comment 5 Jordan Liggitt 2014-01-31 16:12:20 EST
Can you run the rhc call prefixed with HTTP_DEBUG=1 and provide the output?

HTTP_DEBUG=1 be rhc -d members -n YOUR_DOMAIN
or
HTTP_DEBUG=1 be rhc -d members -a YOUR_APP
Comment 6 Jordan Liggitt 2014-01-31 16:18:31 EST
sort_by! isn't defined in Ruby 1.8.7
Comment 7 Luke Meyer 2014-01-31 16:46:10 EST
Ugh, that explains it. But at least it should be easy to patch. I assume we do want to support ruby 1.8.7?
Comment 8 Jordan Liggitt 2014-01-31 17:33:17 EST
Yes, PR in https://github.com/openshift/rhc/pull/542
Comment 10 Brenton Leanhardt 2014-02-03 11:42:02 EST
Upstream commits:

commit ec2dec294a8f7c24f2aa15b6d5221db05d4e73d8
Author: liggitt <jliggitt@redhat.com>
Date:   Fri Jan 31 17:29:33 2014 -0500

    Stop using sort_by! for ruby 1.8.7

commit 528c751163c90a2b7612894f5de690fff4e6d3c7
Author: liggitt <jliggitt@redhat.com>
Date:   Fri Jan 31 17:25:50 2014 -0500

    Add test for domain with more than 5 members
Comment 14 Nan Wei 2014-02-07 01:49:56 EST
openshift enterprise puddle: 2014-02-06.1

rhc 1.19.5
ose: 2.0.z
rhc-1.17.5.1-1.el6op.noarch

step 1: Create a domain and add members to it (edit/admin/view)
[nanwei@dhcp-8-113 ~]$ rhc member list -n nweidomain
Login Role
----- -------------
nwei  admin (owner)
nwei1 admin
nwei3 edit
nwei2 view

2.Modify the members list (add/remove members)
[nanwei@dhcp-8-113 ~]$ rhc member remove nwei2 -n nweidomain
Removing 1 member from domain ... done
[nanwei@dhcp-8-113 ~]$ rhc member add nwei4 -n nweidomain --role edit
Adding 1 editor to domain ... done

3.Issue "rhc domain show"
[nanwei@dhcp-8-113 ~]$ rhc domain show
Domain nweidomain (owned by nwei)
---------------------------------
  Created:            11:46 AM
  ID:                 52f4571e4945dc14ab0000b2
  Allowed Gear Sizes: medium, small
  Members:            nwei1 (admin), nwei3 (edit), nwei4 (edit)
[nanwei@dhcp-8-113 ~]$ rhc member list -n nweidomain
Login Role
----- -------------
nwei  admin (owner)
nwei1 admin
nwei3 edit
nwei4 edit
Comment 16 errata-xmlrpc 2014-02-25 10:44:20 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-0209.html

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