Bug 836882 - Show error message when create app in condition of user gear limited
Show error message when create app in condition of user gear limited
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
2.x
Unspecified Unspecified
high Severity high
: ---
: ---
Assigned To: N. Harrison Ripps
libra bugs
: Triaged
: 839325 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-02 01:52 EDT by Rony Gong
Modified: 2015-05-14 21:59 EDT (History)
5 users (show)

See Also:
Fixed In Version: rhc-0.95.11-1+
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-07-13 19:43:54 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 Rony Gong 2012-07-02 01:52:30 EDT
Description of problem:
user A max_gear is 3 and consumed 2 gears, then want create a scalable app, show error message.





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

How reproducible:
alaways



Steps to Reproduce:
1.
2.
3.
  
Actual results:
[rony@localhost mytest]$ rhc app create -a php -t php-5.3 -s
Password: 

Creating application: php in qgong
/usr/lib/ruby/gems/1.8/gems/rhc-0.95.5/lib/rhc-rest.rb:137:in `process_error_response': Failed to create application php due to: undefined local variable or method `create_result' for #<Gear:0x7f95adc08dd0> (Rhc::Rest::ServerErrorException)
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.95.5/lib/rhc-rest.rb:135:in `each'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.95.5/lib/rhc-rest.rb:135:in `process_error_response'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.95.5/lib/rhc-rest.rb:81:in `send'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.95.5/lib/rhc-rest/domain.rb:30:in `add_application'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.95.5/lib/rhc-common.rb:512:in `create_app'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.95.5/bin/rhc-app:227:in `create_app'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.95.5/bin/rhc-app:502
	from /usr/bin/rhc-app:19:in `load'
	from /usr/bin/rhc-app:19

Expected results:
show app limit message.


Additional info:
Comment 1 Rony Gong 2012-07-02 01:55:38 EDT
user A max_gear is 3 and consumed 2 gears, then want create a non-scalable app, could create success.

user A max_gear is 3 and consumed 3 gears, then want create a non-scalable/scalable app, could show: 

MESSAGES:
qgong@redhat.com has already reached the gear limit of 3
Comment 2 Peter Ruan 2012-07-03 15:23:00 EDT
similiar issue but different error message when I tried to create a scaleable app that pushed the limit over the edge.

[peter@unused-32-138 ~]$ rhc app create -a app3 -t php-5.3 -s -pvostok08 
Creating application: app3 in pppstage
/usr/lib/ruby/gems/1.8/gems/rhc-0.93.19/lib/rhc-rest.rb:134:in `raise': exception object expected (TypeError)
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.93.19/lib/rhc-rest.rb:134:in `process_error_response'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.93.19/lib/rhc-rest.rb:86:in `send'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.93.19/lib/rhc-rest/domain.rb:30:in `add_application'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.93.19/lib/rhc-common.rb:513:in `create_app'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.93.19/bin/rhc-app:227:in `create_app'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.93.19/bin/rhc-app:499
	from /usr/bin/rhc-app:19:in `load'
	from /usr/bin/rhc-app:19
Comment 3 N. Harrison Ripps 2012-07-11 16:17:05 EDT
Addressed problem with better handling of server errors. rhc now exits gracefully in this class of situation. Pull request submitted.
Comment 4 N. Harrison Ripps 2012-07-11 16:21:24 EDT
*** Bug 839325 has been marked as a duplicate of this bug. ***
Comment 5 Rony Gong 2012-07-12 02:23:12 EDT
Verified on devenv_stg_223
[root@localhost mytest]# rhc app create -a php -t php-5.3 -s
Password: 

Creating application: php in qgong1
Problem reported from server. Response code was 406.
Re-run with -d for more information.

MESSAGES:
qgong@redhat.com has already reached the gear limit of 3

[root@localhost mytest]# rhc app create -a php -t php-5.3 
Password: 

Creating application: php in qgong1
Problem reported from server. Response code was 400.
Re-run with -d for more information.

RESULT:
qgong@redhat.com has already reached the gear limit of 3

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