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.
The fix is pretty simple. https://github.com/openshift/origin-server/pull/804 The problem is getting the tests to pass. Thing is, in a devenv, o-o-broker is replaced by rhc-broker, which comes out of li and has its own broker.conf and production.rb. If that value isn't set at least to the default in production.rb, then the code in the above pull fails (it's not expecting nil). So I need this to go in first (it just sets the conf value, doesn't use it): https://github.com/openshift/li/pull/562 I ran all tests against a devenv with both these changes and all passed. I don't know how else to convince Jenkins that these pulls are safe.
As no one is going to need this on day 1 of the release, and I don't want to get bogged down in cross-repo cross-project problems, we will ship it as-is and plan to fix this as an errata.
per Comment #2 I'm lowering the priority/severity.
Merged upstream and verified. Fix in OSE is https://github.com/openshift/enterprise-server/pull/6
Verified this bug with 1.1.x/2012-12-11.3 puddle, and PASS. Steps: 1). On node, modify /etc/openshift/resource_limits.conf node_profile=b4 2). On broker, modify the following line in /etc/openshift/broker.conf. DEFAULT_GEAR_CAPABILITIES="small,b4" 3). Restart openshift-broker service. 4). Create domain 5). Run the following command to check user's capabilities # oo-admin-ctl-user -l xx3 (on broker) User xx3: consumed gears: 0 max gears: 100 gear sizes: small, b4 $ curl -k -X GET -H 'Accept: application/xml' --user xx3:redhat https://broker.example.com/broker/rest/user (on client) 6).Fail to create app with default gear size (small). 7). Create a "b4" gear app successfully $ rhc app create -a app1 -t php-5.3 -g b4
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2013-0220.html