Bug 1091044 - Allow default values additional storage to be overridden in broker.conf
Summary: Allow default values additional storage to be overridden in broker.conf
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Pod
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Lili Nader
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-04-24 17:21 UTC by Jordan Liggitt
Modified: 2018-12-05 18:19 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-15 10:28:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jordan Liggitt 2014-04-24 17:21:26 UTC
Description of problem:

Most capabilities are able to have their defaults set in the broker.conf, but for extra storage capabilities, the default of 0 is not overrideable:

From CloudUser:
  def default_capabilities
    {
      "ha" => Rails.application.config.openshift[:default_allow_ha],
      "subaccounts" => false,
      "gear_sizes" => Rails.application.config.openshift[:default_gear_capabilities],
      "max_domains" => Rails.application.config.openshift[:default_max_domains],
      "max_gears" => Rails.application.config.openshift[:default_max_gears],
      "max_teams" => Rails.application.config.openshift[:default_max_teams],
      "view_global_teams" => Rails.application.config.openshift[:default_view_global_teams]
    }
  end

  def max_untracked_additional_storage
    capabilities['max_untracked_addtl_storage_per_gear'] || 0
  end

  def max_tracked_additional_storage
    capabilities['max_tracked_addtl_storage_per_gear'] || 0
  end




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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 4 Jianwei Hou 2014-05-05 03:15:14 UTC
Tested on devenv_4757

The values have been set as:
# Default max untracked additional storage per gear
DEFAULT_MAX_UNTRACKED_ADDTL_STORAGE_PER_GEAR="10"
# Default max tracked additional storage per gear
DEFAULT_MAX_TRACKED_ADDTL_STORAGE_PER_GEAR="8"

Clear broker cache and restart btoker, then create a new user and list its capabilities. The result shows that the user still has the default tracked and untracked storage with value 0.

[root@ip-10-150-48-51 ~]# oo-admin-ctl-user  -l jhou


User jhou:
                            plan: free
                   plan quantity: 1
            plan expiration date: 
                consumed domains: 0
                     max domains: 1
                  consumed gears: 0
                       max gears: 3
    max tracked storage per gear: 0
  max untracked storage per gear: 0
                       max teams: 0
viewing all global teams allowed: false
            plan upgrade enabled: true
                      gear sizes: small
            sub accounts allowed: false
private SSL certificates allowed: false
              inherit gear sizes: false
                      HA allowed: false

Comment 5 Jianwei Hou 2014-05-07 02:15:32 UTC
Verified on devenv_4767. After setting broker-dev.conf, the user has following default capabilities:
[root@ip-10-65-156-250 ~]# cat /etc/openshift/broker-dev.conf |grep STORAGE
DEFAULT_MAX_UNTRACKED_ADDTL_STORAGE_PER_GEAR="10"
DEFAULT_MAX_TRACKED_ADDTL_STORAGE_PER_GEAR="10"


[root@ip-10-65-156-250 ~]# oo-admin-ctl-user -l jhou


User jhou:
                            plan: free
                   plan quantity: 1
            plan expiration date: 
                consumed domains: 1
                     max domains: 1
                  consumed gears: 0
                       max gears: 3
    max tracked storage per gear: 10
  max untracked storage per gear: 10
                       max teams: 0
viewing all global teams allowed: false
            plan upgrade enabled: true
                      gear sizes: small
            sub accounts allowed: false
private SSL certificates allowed: false
              inherit gear sizes: false
                      HA allowed: false


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