Bug 830642 - Return code error while running "rhc domain show" the first time for a new user
Return code error while running "rhc domain show" the first time for a new user
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Master (Show other bugs)
1.x
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: Abhishek Gupta
libra bugs
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-11 01:11 EDT by Xiaoli Tian
Modified: 2012-06-25 14:26 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-25 14:26:53 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 Xiaoli Tian 2012-06-11 01:11:07 EDT
Description of problem:
If running rhc domain show for a new user who do not have any domain the first time, it will output the following errors:

rhc domain show -l xtian+t100@redhat.com -p 1
Problem reported from server. Response code was 500.
Re-run with -d for more information.

RESULT:
You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.each

If running the second time, the error is gone:
#rhc domain show -l xtian+t100@redhat.com -p 1
User Info
=========
Namespace: No namespaces found. You can use 'rhc domain create -n <namespace>' to create a namespace for your applications.
  RHLogin: xtian+t100@redhat.com



Version-Release number of selected component (if applicable):
rhc-0.94.3-1.el6_2.noarch

How reproducible:
Always

Steps to Reproduce:
1.Run rhc domain show for a new user 
2.Run rhc domain show again
  
Actual results:
Step 1 will output errors
Step 2 will work well

Expected results:
Both step1 and step2 should not output errors.

Additional info:
Comment 1 Clayton Coleman 2012-06-18 10:20:27 EDT
Looks like a bug in the old broker API
Comment 2 Abhishek Gupta 2012-06-19 18:52:08 EDT
I'll pick this one up.
Comment 3 Abhishek Gupta 2012-06-21 13:26:43 EDT
Will wait for the push to stage before submitting a pull request for this one.
Comment 4 Xiaoli Tian 2012-06-25 01:18:22 EDT
Verified it on rhc-0.95.4:

#rhc domain show -l xtian+t102@redhat.com -p 12

User Info
=========
Namespace: No namespaces found. You can use 'rhc domain create -n <namespace>' to create a namespace for your applications.
  RHLogin: xtian+t102@redhat.com


Application Info
================
No applications found.  You can use 'rhc app create' to create new applications.

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