Bug 885097 - No config setting for default gear capabilities for a new user
Summary: No config setting for default gear capabilities for a new user
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Pod
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Luke Meyer
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks: 872415
TreeView+ depends on / blocked
 
Reported: 2012-12-07 13:59 UTC by Luke Meyer
Modified: 2015-05-15 02:10 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-19 19:27:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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(","),


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