Bug 885097

Summary: No config setting for default gear capabilities for a new user
Product: OKD Reporter: Luke Meyer <lmeyer>
Component: PodAssignee: Luke Meyer <lmeyer>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.xCC: bmeng
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: 2012-12-19 19:27:41 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 872415    

Description Luke Meyer 2012-12-07 13:59:26 UTC
Origin bug for BZ 872415:

Description of problem:
What I'm looking for is that as an admin, I can define the default gear profiles available to a user when they first log in (which is when they're created in mongo in OSE). In OSE they could have dozens of gear profiles available, and only want the user to get a few by default.

I don't think there is actually a broker.conf key for this. It looks like currently when a user is created, they get :default_gear_size as their capability:

./controller/lib/openshift-origin-controller/app/models/cloud_user.rb:    self.capabilities['gear_sizes'] = [Rails.application.config.openshift[:default_gear_size]] unless self.capabilities.has_key?('gear_sizes')

But that's not what that key is for; it's for choosing a gear size at app create time when the user didn't specify one. Just happens to work out on hosted.

There's also a :gear_sizes key which maps from VALID_GEAR_SIZES. Using that would default each user to have access to all gear profiles, probably not what we want.


Additional info:

Going to add :default_gear_capabilities and use that.

Comment 1 Luke Meyer 2012-12-07 14:01:05 UTC
Fixed with following changes:

https://github.com/openshift/li/pull/681
https://github.com/openshift/origin-server/pull/804

Believe these are in the present build.

Comment 2 Meng Bo 2012-12-10 11:18:33 UTC
Checked on devenv_2577,
DEFAULT_GEAR_CAPABILITIES="small" defined in the broker.conf file.

And is used in development.rb
    :default_gear_capabilities => conf.get("DEFAULT_GEAR_CAPABILITIES", "small").split(","),