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:
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 has already reached the gear limit of 3
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
Addressed problem with better handling of server errors. rhc now exits gracefully in this class of situation. Pull request submitted.
*** Bug 839325 has been marked as a duplicate of this bug. ***
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 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 has already reached the gear limit of 3