I think you can work arround this issue with however we should not have to. # oo-admin-ctl-domain -c update --allowed_gear_sizes small,large -l admin -n admin
For the public who can't see the (private) bug report, it's basically this: If you remove a valid gear size in broker.conf after it's already in use (users, domains, apps created) then it causes validation problems later, specifically when you try to modify an existing domain having that gear size ("Validation of Domain failed."). There could be other ramifications too, but this is the one reported. Nothing goes through after a change like this to broker.conf to "true up" the existing records. Frankly, it would be unclear what we should do with apps/nodes/districts/regions that now are unrecognized by the broker. Technically, the administrator should disable all of the nodes in the profile, destroy all of the apps (or perhaps move them to a different profile), remove any districts/regions for the profile, and only then remove the profile from broker.conf. None of this would fix the existing users and domains. A decent workaround would be to use oo-admin-ctl-user with a list of all users to remove the gear size from them prior to removing it from broker.conf. Since there is no way I know of to *get* a list of all OpenShift users (aside from MongoDB query) it would be really nice to have a "--all" flag of some kind on oo-admin-ctl-user for situations like this. This would be a good addition to the docs, both the current state of affairs and any improvements that come. It might also be good if domain and user capability validation silently removed invalid gear sizes rather than choking on them while doing something unrelated.
I don't think this particular problem is directly addressed, but upstream changes should make it easy for admins to fix the underlying issue.
http://etherpad.corp.redhat.com/puddle-2-2-2014-10-07
Check on puddle [2.2/2014-10-07.2] Steps: 1. Create an app with small gear 2. Remove small gear size from /etc/openshift/broker.conf, add 'medium' to VALID_GEAR_SIZES. 3. Attempt to add the 'medium' to the user, new gear size added successfully. 4. Run oo-admin-chk, the inconsistent user capability is detected 5. Fix it with oo-admin-repair, and run oo-admin-chk again. 6. List the user and domain, there is no small gear size Result: After step 3: # oo-admin-ctl-user -l xiaom --addgearsize medium Adding gear size medium for user xiaom... Problem: Validation of Domain failed. Summary: The following errors were found: Allowed gear sizes The following gear sizes are invalid: small Resolution: Try persisting the document with valid data or remove the validations. /opt/rh/ruby193/root/usr/share/gems/gems/mongoid-3.1.4/lib/mongoid/persistence.rb:335:in `fail_validate!' /opt/rh/ruby193/root/usr/share/gems/gems/mongoid-3.1.4/lib/mongoid/persistence.rb:97:in `save!' /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.31.5/app/models/cloud_user.rb:409:in `block in add_gear_size' /opt/rh/ruby193/root/usr/share/gems/gems/mongoid-3.1.4/lib/mongoid/relations/referenced/many.rb:169:in `block in each' /opt/rh/ruby193/root/usr/share/gems/gems/mongoid-3.1.4/lib/mongoid/relations/targets/enumerable.rb:184:in `block in each' /opt/rh/ruby193/root/usr/share/gems/gems/mongoid-3.1.4/lib/mongoid/contextual/mongo.rb:640:in `yield_document' /opt/rh/ruby193/root/usr/share/gems/gems/mongoid-3.1.4/lib/mongoid/contextual/mongo.rb:123:in `block (2 levels) in each' /opt/rh/ruby193/root/usr/share/gems/gems/moped-1.5.0/lib/moped/query.rb:77:in `block in each' /opt/rh/ruby193/root/usr/share/gems/gems/moped-1.5.0/lib/moped/cursor.rb:26:in `block in each' /opt/rh/ruby193/root/usr/share/gems/gems/moped-1.5.0/lib/moped/cursor.rb:26:in `each' /opt/rh/ruby193/root/usr/share/gems/gems/moped-1.5.0/lib/moped/cursor.rb:26:in `each' /opt/rh/ruby193/root/usr/share/gems/gems/moped-1.5.0/lib/moped/query.rb:76:in `each' /opt/rh/ruby193/root/usr/share/gems/gems/moped-1.5.0/lib/moped/query.rb:76:in `each' /opt/rh/ruby193/root/usr/share/gems/gems/mongoid-3.1.4/lib/mongoid/contextual/mongo.rb:122:in `block in each' /opt/rh/ruby193/root/usr/share/gems/gems/mongoid-3.1.4/lib/mongoid/contextual/mongo.rb:619:in `selecting' /opt/rh/ruby193/root/usr/share/gems/gems/mongoid-3.1.4/lib/mongoid/contextual/mongo.rb:121:in `each' /opt/rh/ruby193/root/usr/share/gems/gems/mongoid-3.1.4/lib/mongoid/contextual.rb:19:in `each' /opt/rh/ruby193/root/usr/share/gems/gems/mongoid-3.1.4/lib/mongoid/relations/targets/enumerable.rb:181:in `each' /opt/rh/ruby193/root/usr/share/gems/gems/mongoid-3.1.4/lib/mongoid/relations/referenced/many.rb:169:in `each' /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.31.5/app/models/cloud_user.rb:406:in `add_gear_size' /usr/sbin/oo-admin-ctl-user:380:in `block in add_gear_size' /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.31.5/app/models/lock.rb:92:in `_run_in_app_user_lock' /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.31.5/app/models/lock.rb:38:in `run_in_user_lock' /usr/sbin/oo-admin-ctl-user:379:in `add_gear_size' /usr/sbin/oo-admin-ctl-user:728:in `block in <main>' /usr/sbin/oo-admin-ctl-user:653:in `each' /usr/sbin/oo-admin-ctl-user:653:in `<main>' After step 4: # oo-admin-chk -l 1 <--snip--> Some domains have invalid gear sizes allowed: small Some users have invalid gear sizes in their capabilities: small FAILED Please refer to the oo-admin-repair tool to resolve some of these inconsistencies. After step 5: # oo-admin-repair --gear-sizes -v Some users have invalid gear sizes in their capabilities: small Some domains have invalid gear sizes allowed: small Removing invalid gear sizes (small) from all users... Done. Removing invalid gear sizes (small) from all domains... Done. # oo-admin-chk -l 1 <--snip--> Checked premium cart usage inconsistencies in 0 seconds Checked usage record inconsistencies in 0 seconds Checked user plan inconsistencies in 0 seconds Finished at: 2014-10-08 08:05:44 UTC Total time: 40.931s SUCCESS
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. https://rhn.redhat.com/errata/RHSA-2014-1796.html