Description of problem: The broker and console should be able to use memcached as the cache store. The default rails cache store creates a file for each unique request made to the application. Eventually, the rails cache store will use up all of the system's free inodes. Using memcached resolves this issue. Currently, the configuration to use memcached requires changes to files that are not marked as configuration files in their respective rpm's. This means that they will be overwritten on a yum update. See https://access.redhat.com/site/solutions/800093 Version-Release number of selected component (if applicable): - How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
This ought to cause the broker to load the 'dalli' gem (if installed) without editing Gemfile.conf: # touch /etc/openshift/plugins.d/dalli.conf Clearing or "cleaning" (remove expired) the cache periodically should also work around the issue.
It seems that it is possible to use memcached with the broker as-is, following the instructions in the knowledge-base article and comments (i.e., modify CACHE_STORE in broker.conf and touch /etc/openshift/plugins.d/dalli.conf). Is this solution for the broker side of the problem acceptable? That leaves the management console. We probably don't want to try to autoload required gems based on the CACHE_STORE setting because that would require parsing it and matching it with each rubygem we wanted to allow. Instead, we could add something like an ADDITIONAL_RUBYGEMS setting to both console.conf and broker.conf and make Gemfile respect it. Then enabling memcached would require just modifying the two settings (CACHE_STORE and ADDITIONAL_RUBYGEMS) in each of the two files (broker.conf and console.conf). Would this be an acceptable solution?
Miciah, The issue with the broker setup is that it requires modification of the 'Gemfile'. When updates occur, the Gemfile is not marked as a configuration file and can be overwritten if any updates have been made. We either need to be able to do this without modifying the Gemfile. Your solution to add an 'ADDITIONAL_RUBYGEMS' directive to broker.conf and console.conf appears to be spot on. This would solve the problem completely.
Gave it a shot: https://github.com/openshift/origin-server/pull/5920
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/c5bce4afae1aa461d805ba36336a2a54341d7e74 Specify additional gems to be loaded in the broker and console Bug 1094454 Bugzilla link https://bugzilla.redhat.com/show_bug.cgi?id=1094454 Added ability to specify additional gems to be loaded in the broker and console Gemfiles.
Check on puddle [2.2.6/2015-05-18.1] 1. add 'nokogiri' package in broker.conf ADDITIONAL_RUBYGEMS="nokogiri" 2. restart the broker #yum install ruby193-rubygem-nokogiri #/etc/init.d/openshift-broker restart 3, Check the Gemfile.lock vim /var/www/openshift/broker/Gemfile.lock <--snip--> nokogiri (1.5.11) load nokogiri without modifying the Gemfile 4. add 'nokogiri' package in console.conf ADDITIONAL_RUBYGEMS="nokogiri" 5. restart the console #/etc/init.d/openshift-console restart 6. Check the Gemfile.lock # grep nokogiri /var/www/openshift/console/* Not load the nokogiri package Check the code on console # vim /var/www/openshift/console/Gemfile source 'https://rubygems.org' # Fedora 19 splits psych out into its own gem. if Gem::Specification.respond_to?(:find_all_by_name) and not Gem::Specification::find_all_by_name('psych').empty? gem 'psych' end gem 'openshift-origin-console', :require => 'console', :path => ENV['CONSOLE_PATH'] gem 'rake', '> 0.9.2' gem 'pry', :require => 'pry' if ENV['PRY'] gem 'perftools.rb', :require => 'perftools' if ENV['PERFTOOLS'] gem 'syslog-logger', '~> 1.6.8', :require => false group :assets do gem 'compass-rails', '~> 1.0.3' gem 'sass-rails', '~> 3.2.5' gem 'coffee-rails', '~> 3.2.2' gem 'jquery-rails', '~> 3.1.0' gem 'uglifier', '>= 1.2.6' gem 'therubyracer', '>= 0.10' gem 'sass-twitter-bootstrap', '2.0.1' gem 'minitest', '>= 3.5.0' end The codes are not merged into /var/www/openshift/console/Gemfile file
Below are the steps to properly test this. I apologize, I should have included these before the bug was set ON_QA: 1) Add the new gem(s) to the ADDITIONAL_RUBYGEMS directive in the broker.conf 2) Ensure the gem(s) are available by installing them.: # oo-exec-ruby gem install <gem_name> 2a) Resolve any dependencies when installing the gem(s). For example, the 'nokogiri' gem will require you install at least the following packages with yum: ruby193-ruby-devel gcc-c++ libxml2-devel zlib-devel patch 3) Re-bundle the Gemfile for the broker # cd /var/www/openshift/broker # oo-exec-ruby bundle install --local 4) Check the Gemfile.lock for the additionaly rubygem previously added to the broker.conf 5) Restart the broker service # service openshift-broker restart The same above steps can be run for the console using the console.conf and running the bundle command in the '/var/www/openshift/console' directory.
Please check the PR #5920. The codes are not merged in /var/www/openshift/console/Gemfile file.
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/6e4af869c246c4692bda332292c42eb0fbae1056 Specify addition rubygems in the openshift-console, rathen than the admin-console Bug 1094454 A change made for 1094454 (pr 5920) allowed additional rubygems for the openshift management console, rather than the openshift console.
Sorry about that. https://github.com/openshift/origin-server/pull/6149 should resolve this.
https://github.com/openshift/origin-server/pull/6150 submitted to resolve possible encoding issues.
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/6becd5ae49f195d80bfd712b917ebe488613315b Read configuration files from Gemfile as a binary Bug 1094454 https://bugzilla.redhat.com/show_bug.cgi?id=1094454 External data must be read in as binary to avoid encoding conflicts in some environments where the encoding of the configuration files does not match the default encoding for ruby.
Check on puddle [2.2.6/2015-05-21.1] 1. Add ADDITIONAL_RUBYGEMS="nokogiri" in configuration file #echo 'ADDITIONAL_RUBYGEMS="nokogiri"' >> /etc/openshift/broker.conf #echo 'ADDITIONAL_RUBYGEMS="nokogiri"' >> /etc/openshift/console.conf 2. Install the package # oo-exec-ruby gem install nokogiri 3. restart the service # /etc/init.d/openshift-console restart # /etc/init.d/openshift-broker restart 4. Check the Gemfile.lock # grep -r nokogiri /var/www/openshift/* /var/www/openshift/broker/Gemfile.lock: nokogiri (1.6.6.2) /var/www/openshift/broker/Gemfile.lock: nokogiri /var/www/openshift/console/Gemfile.lock: nokogiri (1.6.6.2) /var/www/openshift/console/Gemfile.lock: nokogiri The package is loaded.
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/RHBA-2015-1463.html