Created attachment 668717 [details] development.log Description of problem: Create an enviroment that has 2 districts and each district has an active node. mco ping [root@ip-10-224-110-206 openshift]# mco ping ip-10-100-203-152 time=96.31 ms ip-10-202-85-78 time=130.94 ms Then create app in this environment, failed with error(please see the attachment for detail): 012-12-25 00:37:47.263 [DEBUG] MOPED: 127.0.0.1:27017 QUERY database=openshift_broker_dev collection=districts selector={"available_capacity"=>{"$gte"=>0}, "gear_size"=>"small", "active_server_identities_size"=>{"$gte"=>0}} flags=[:slave_ok] limit=0 skip=0 fields=nil (15.7084ms) (pid:1783) 2012-12-25 00:37:47.264 [ERROR] undefined method `>' for false:FalseClass (pid:1783) 2012-12-25 00:37:47.264 [ERROR] ["/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.3.2/app/models/district.rb:44:in `sort'", "/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.3.2/app/models/district.rb:44:in `find_available'", "/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-msg-broker-mcollective-1.3.1/lib/openshift/mcollective_application_container_proxy.rb:33:in `find_available_impl'", "/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.3.2/l Version-Release number of selected component (if applicable): fork_ami_refctr1_372 How reproducible: Always Steps to Reproduce: 1.Setup multi districts enviroment 2.Create app in this enviroment 3. Actual results: [qgong@localhost dev]$ rhc app create q4php php-5.3 Password: Application Options =================== Gear Size: default Scaling: no Namespace: qgong21 Cartridge: php-5.3 Creating application 'q4php' ... done Waiting for your DNS name to be available ... retry # 1 - Waiting for DNS: q4php-qgong21.dev.rhcloud.com retry # 2 - Waiting for DNS: q4php-qgong21.dev.rhcloud.com retry # 3 - Waiting for DNS: q4php-qgong21.dev.rhcloud.com retry # 4 - Waiting for DNS: q4php-qgong21.dev.rhcloud.com Expected results: Could create app successuflly Additional info:
Fixed in >= fork_ami_refctr1_373
Verified on fork_ami_refctr1_373 1.Create non_scalable app [qgong@localhost dev]$ rhc app create q4php php-5.3 Password: Application Options =================== Gear Size: default Scaling: no Cartridge: php-5.3 Namespace: qgong6 Creating application 'q4php' ... done Waiting for your DNS name to be available ... done Downloading the application Git repository ... Initialized empty Git repository in /home/qgong/mytest/dev/q4php/.git/ Warning: Permanently added 'q4php-qgong6.dev.rhcloud.com' (RSA) to the list of known hosts. Your application code is now in 'q4php' q4php @ http://q4php-qgong6.dev.rhcloud.com/ (uuid: 50e67505aa707ac308000005) ============================================================================= Created: 6:21 AM Git URL: ssh://50e67505aa707ac308000005.rhcloud.com/~/git/q4php.git/ SSH: 50e67505aa707ac308000005.rhcloud.com php-5.3 (PHP 5.3) ================= RESULT: Application q4php was created. 1.Create scalable app [qgong@localhost dev]$ rhc app create -a qsjbossas -s -t jbossas-7 Password: Application Options =================== Gear Size: default Namespace: qgong6 Cartridge: jbossas-7 Scaling: yes Creating application 'qsjbossas' ... done Waiting for your DNS name to be available ... done Downloading the application Git repository ... Initialized empty Git repository in /home/qgong/mytest/dev/qsjbossas/.git/ Warning: Permanently added 'qsjbossas-qgong6.dev.rhcloud.com' (RSA) to the list of known hosts. Your application code is now in 'qsjbossas' qsjbossas @ http://qsjbossas-qgong6.dev.rhcloud.com/ (uuid: 50e675faaa707ac308000040) ===================================================================================== Created: 6:26 AM Git URL: ssh://50e675faaa707ac308000040.rhcloud.com/~/git/qsjbossas.git/ SSH: 50e675faaa707ac308000040.rhcloud.com jbossas-7 (JBoss Application Server 7.1) ======================================== Scaling: x1 (minimum: 1, maximum: available) on small gears haproxy-1.4 (HAProxy 1.4) ========================= RESULT: Application qsjbossas was created.