Bug 808440

Summary: Application limit error message should be wrapper well in rhc-rest
Product: OKD Reporter: Xiaoli Tian <xtian>
Component: PodAssignee: Abhishek Gupta <abhgupta>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: medium    
Version: 2.xCC: abhgupta, rmillner
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rhc-0.94.3-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-25 18:27:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Xiaoli Tian 2012-03-30 11:49:54 UTC
Description of problem:
While trying to create an scalable app while the user already occupied 2 gears with client tool,  the error is like following:
../../rhc-rest/lib/rhc-rest.rb:144:in `process_error_response': Failed to create application scalejboss1 due to:Failed: Either application limit has already reached or domain doesn't exist for 'xtian+t62' (Rhc::Rest::ServerErrorException)
        from ../../rhc-rest/lib/rhc-rest.rb:142:in `each'
        from ../../rhc-rest/lib/rhc-rest.rb:142:in `process_error_response'
        from ../../rhc-rest/lib/rhc-rest.rb:86:in `send'
        from ../../rhc-rest/lib/rhc-rest/domain.rb:23:in `add_application'
        from ../lib/rhc-common.rb:416:in `create_app'
        from rhc-create-app:24

Version-Release number of selected component (if applicable):
devenv-stage_154

rhc-0.89.10-1.el6_2.noarch
latest rhc-rest code (we use source code to test since the rhc-rest is not updated)


How reproducible:
Always

Steps to Reproduce:
1.git clone os-client-tools code

2. ruby -I ../lib/ -I ../../rhc-rest/lib/ rhc-create-app -a scaleperl1 -t perl-5.10 -s 


  
Actual results:
Fail with exceptions in code

Expected results:
Should wrapper the error messages.



Additional info:

Comment 1 Clayton Coleman 2012-04-10 22:11:25 UTC
This looks like the exception coming back from rhc-rest isn't sufficient.

Comment 2 Xiaoli Tian 2012-04-27 06:31:41 UTC
Still exists on rhc-0.92.1


Creating application: scalephp1 in domx012
/usr/lib/ruby/gems/1.8/gems/rhc-0.92.1/lib/rhc-rest.rb:144:in `process_error_response': Failed to create application scalephp1 due to:Failed: Either application limit has already reached or domain doesn't exist for 'xtian+t91' (Rhc::Rest::ServerErrorException)
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.92.1/lib/rhc-rest.rb:142:in `each'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.92.1/lib/rhc-rest.rb:142:in `process_error_response'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.92.1/lib/rhc-rest.rb:86:in `send'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.92.1/lib/rhc-rest/domain.rb:30:in `add_application'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.92.1/lib/rhc-common.rb:442:in `create_app'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.92.1/bin/rhc-app:230:in `create_app'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.92.1/bin/rhc-app:569
	from /usr/bin/rhc-app:19:in `load'
	from /usr/bin/rhc-app:19

Comment 3 Xiaoli Tian 2012-06-11 06:14:49 UTC
Verified it on devenv_1827 with rhc-0.94.3-1.el6_2.noarch, the error message is cleaner.

#rhc app create -a scalejboss -t jbossas-7  -s -p 1
Creating application: scalejboss in domaindev003
Problem reported from server. Response code was 406.
Re-run with -d for more information.

MESSAGES:
Failed to create application scalejboss due to:Failed: Either application limit has already reached or domain doesn't exist for 'xtian+t100'