+++ This bug was initially created as a clone of Bug #993250 +++ Description of problem: When there is a problem with the broker Gemfile or Gemfile.lock, invocation of Bundler via command line tools based on the broker will fail with a message recommending running "bundle install" which in most cases, is not what we want the user to do - we would like people to use the gems supplied by RPMs we have packaged and tested. "bundle install" installs gems from rubygem.org with unpredictable / unsupportable results. How reproducible: This happens frequently during installs when broker plugin conf gets messed up in one way or another (typo, missed RPM install, etc.) and also due to yum update when gem RPMs are updated but the broker not restarted. Steps to Reproduce: 1. touch /etc/openshift/plugins.d/openshift-origin-foo.conf 2. Run "oo-admin-clear-pending-ops" or similar 3. rm /etc/openshift/plugins.d/openshift-origin-foo.conf 4. Edit /var/www/openshift/broker/Gemfile.lock and change specific version of a gem, e.g. set bigdecimal (1.2.1) 5. Run "oo-admin-ctl-district" or similar Actual results: (2) # oo-admin-clear-pending-ops Could not find gem 'openshift-origin-foo (>= 0) ruby' in the gems available on this machine. Run `bundle install` to install missing gems. (5) # oo-admin-ctl-district Could not find bigdecimal-1.2.1 in any of the sources Run `bundle install` to install missing gems. Expected results: Something telling you that you need to change plugin config, install RPMs, or rm Gemfile.lock (running any of these generates it if it's missing). Additional info: Commands that really should give helpful output under these conditions, being frequently used around install/upgrade scenarios: oo-accept-broker oo-diagnostics oo-admin-broker-cache --clear oo-register-dns oo-admin-ctl-district
Cherry-picked from origin-server: Author: Luke Meyer <lmeyer> commit 0771a6d1c2e57a41bbd9e49dc16f99d4657a34ac <broker> improve Gemfile loading + bug 993250 https://bugzilla.redhat.com/show_bug.cgi?id=993250 Bundler load failures are wrapped and re-interpreted for OpenShift instead of telling the user to "bundle install" OPENSHIFT_CONF_DIR overrides /etc/openshift base for broker config files Gemfile loads plugins even if just the -dev.conf file is present Plugins are loaded in sorted order, in case it matters
Checked this issue on puddle 1.2/2013-08-15, it works well. 1.Touch /etc/openshift/plugins.d/openshift-origin-foo.conf [root@broker ~]# oo-admin-clear-pending-ops Error while loading gems for the broker: Could not find gem 'openshift-origin-foo (>= 0) ruby' in the gems available on this machine. You may need to install the rubygem-openshift-origin-foo RPM. Or, you may need to remove/rename the openshift-origin-foo conf file(s) in /etc/openshift/plugins.d 2. Edit /var/www/openshift/broker/Gemfile.lock and change specific version of a gem, set bigdecimal (1.2.1) [root@broker broker]# oo-admin-ctl-district Error while loading gems for the broker: Could not find bigdecimal-1.2.0 in any of the sources This usually means gem RPMs have been updated and Gemfile.lock is stale. Please restart the openshift-broker service to update it, and try again.
Fixing that "fewer broker installations" typo.
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/RHBA-2013-1211.html