Bug 1029424

Summary: Changes to DEFAULT_MAX_DOMAINS / DEFAULT_MAX_GEARS / DEFAULT_GEAR_CAPABILITIES in broker-dev.conf does not take effect.
Product: OpenShift Online Reporter: Liang Xia <lxia>
Component: PodAssignee: Ravi Sankar <rpenta>
Status: CLOSED NOTABUG QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: jliggitt, rpenta, xtian
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-12 17:13:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Liang Xia 2013-11-12 11:28:16 UTC
Description of problem:
Changes to DEFAULT_MAX_DOMAINS/DEFAULT_MAX_GEARS/DEFAULT_GEAR_CAPABILITIES in broker-dev.conf does not take effect.

Version-Release number of selected component (if applicable):
devenv_4018
rhc 1.17.2

How reproducible:
always

Steps to Reproduce:
1.On devenv, modify the broker-dev.conf, eg,
DEFAULT_GEAR_CAPABILITIE to "small,medium", 
DEFAULT_MAX_DOMAINS to 2,
DEFAULT_MAX_GEARS to 6,
DEFAULT_GEAR_SIZE to "medium"
2.Clear broker cache and restart broker/mcollective
3.Create a new user and check the user's capability.
4.Create an app.

Actual results:
Changes to DEFAULT_GEAR_SIZE take effect, but others are not.

Step 3,
# oo-admin-ctl-user -l dd
User dd:
                            plan: free
                consumed domains: 1
                     max domains: 1
                  consumed gears: 0
                       max gears: 3
    max tracked storage per gear: 0
  max untracked storage per gear: 0
            plan upgrade enabled: true
                      gear sizes: small
            sub accounts allowed: false
private SSL certificates allowed: false
              inherit gear sizes: false
                      HA allowed: false
# rhc account
Login dd on localhost
---------------------
  ID:                 5281ca6e73fc5fdc6e000001
  Plan:               Free
  Gears Used:         0
  Gears Allowed:      3
  Domains Allowed:    1
  Allowed Gear Sizes: small
  SSL Certificates:   no

Step 4,
# rhc app create dd php-5.3
Application Options
-------------------
  Domain:     dd
  Cartridges: php-5.3
  Gear Size:  default
  Scaling:    no
Creating application 'dd' ... The gear size 'medium' is not valid for this domain. Allowed sizes: small.

Expected results:
User's capability should be get from config file.

Additional info:

Comment 1 Jordan Liggitt 2013-11-12 17:13:08 UTC
The configured capabilities for the user's plan (in openshift-origin-billing-aria.rb) override the defaults, as intended.

These defaults are used if the user's plan has no value for those capabilities (max_domains, max_gears, etc).