Created attachment 629813 [details] Error page when used number as the scalable app name. Description of problem: When I tested on the fork_ami_US1375_BZ867779_scaling_and_gear_sizes_in_app_creation_fixed_248, I found that if I set the app name as a number (such as "19" ) and set the app type as a scalable app, I will always get error page like the attachment shown when I clicked "create application' button .And the app cannot be created successfully. If I changed the app name to words without number, or to names with both letters and number (such as "ruby","r18","18r"), I can created scalable apps successfully. Version-Release number of selected component (if applicable): fork_ami_US1375_BZ867779_scaling_and_gear_sizes_in_app_creation_fixed_248, devenv_2348 How reproducible: always Steps to Reproduce: 1.Go to website and login. 2.Created a scalable app, and set its name as numbers (such as "19"). 3.Click the "create application' button in the app created page. Actual results: Got error page like the attachment shown. And cannot create the app successfully. Expected results: The app should be created successfully. Additional info: If I use CLI command to create the scalable app used a number as its name, I will get error as below:(this can reproduce both on the form-ami and devenv_2348) ############################################### [root@dhcp-8-205 ~]# rhc app create -l 111 -s -a 1889 -t python-2.6 Password: Creating application: 1889 in 1122 nil ********** /usr/lib/ruby/gems/1.8/gems/rhc-0.99.5/lib/rhc-common.rb:522:in `create_app': undefined method `uuid' for []:Array (NoMethodError) from /usr/lib/ruby/gems/1.8/gems/rhc-0.99.5/bin/rhc-app:229:in `create_app' from /usr/lib/ruby/gems/1.8/gems/rhc-0.99.5/bin/rhc-app:504 from /usr/bin/rhc-app:19:in `load' from /usr/bin/rhc-app:19 ############################################### If I use number such as "188" as the name of a non-scalable app, the app can be created successful (both work via website and CLI ).
I could no reproduce this using the REST API directly. I believe it is a bug in website.
Verified that this is also broken for the CLI. This is looking like a broker bug to me...
Broker bug, reproduced in latest code. Rails is coercing 19 to a Fixnum, broker should force .to_s on the parameter. ESC[0;37m2012-12-18 11:01:57.128ESC[0m [ESC[31mFATALESC[0m] NoMethodError (undefined method `length' fo r 19:Fixnum): openshift-origin-controller (1.3.1) app/models/application.rb:29:in `block in <class:Application>' activemodel (3.2.8) lib/active_model/validator.rb:181:in `call' activemodel (3.2.8) lib/active_model/validator.rb:181:in `validate_each' activemodel (3.2.8) lib/active_model/validator.rb:153:in `block in validate' activemodel (3.2.8) lib/active_model/validator.rb:150:in `each' activemodel (3.2.8) lib/active_model/validator.rb:150:in `validate' activesupport (3.2.8) lib/active_support/callbacks.rb:310:in `_callback_before_9' activesupport (3.2.8) lib/active_support/callbacks.rb:418:in `_run__3107530055360231994__validate__32 4785107521598667__callbacks' activesupport (3.2.8) lib/active_support/callbacks.rb:405:in `__run_callback' activesupport (3.2.8) lib/active_support/callbacks.rb:385:in `_run_validate_callbacks' activesupport (3.2.8) lib/active_support/callbacks.rb:81:in `run_callbacks' activemodel (3.2.8) lib/active_model/validations.rb:227:in `run_validations!' activemodel (3.2.8) lib/active_model/validations.rb:194:in `valid?'
Fixed with model refactor or before. Couldn't recreate: dmcphers@mcpherson:~/code/li (master)$ rhc app create -l danmcp10 -a 19 -t php-5.3 --no-git --no-dns -s Password: Application Options ------------------- Namespace: danmcp10 Cartridges: php-5.3 Gear Size: default Scaling: yes Creating application '19' ... done 19 @ http://19-danmcp10.dev.rhcloud.com/ (uuid: 51034cff514f62366b000001) ------------------------------------------------------------------------- Created: Jan 26 3:26 AM Gears: 1 (defaults to small) Git URL: ssh://51034cff514f62366b000001.rhcloud.com/~/git/19.git/ SSH: 51034cff514f62366b000001.rhcloud.com php-5.3 (PHP 5.3) ----------------- Scaling: x1 (minimum: 1, maximum: available) on small gears haproxy-1.4 (OpenShift Web Balancer) ------------------------------------ Gears: Located with php-5.3 RESULT: Application 19 was created.
Tested on devenv_2734, user can use number as the name to create scalable app successfully, so verify this bug.