Bug 890101 - [fork][model refactor]Can't create app in multi districts environment
Summary: [fork][model refactor]Can't create app in multi districts environment
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Pod
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Dan McPherson
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-25 06:04 UTC by Rony Gong 🔥
Modified: 2015-05-15 02:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-13 22:53:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
development.log (67.75 KB, text/plain)
2012-12-25 06:04 UTC, Rony Gong 🔥
no flags Details

Description Rony Gong 🔥 2012-12-25 06:04:20 UTC
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:

Comment 1 Dan McPherson 2013-01-02 17:42:15 UTC
Fixed in >= fork_ami_refctr1_373

Comment 2 Rony Gong 🔥 2013-01-04 06:28:34 UTC
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.


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