So I've got Puppet Enterprise 2.7 on a "master" node, puppetentmaster. While working to craft new recipes for installing Ruby 2.0 on a "client" node, I noticed if I forced the client to begin using gem 2.0 I would run into errors like:
err: /Stage[main]/_ruby::Mysql_gem/Package[mysql]/ensure: change from absent to 2.8.1 failed: Could not update: Execution of '/usr/bin/gem install -v 2.8.1 --include-dependencies --no-rdoc --no-ri mysql' returned 1: ERROR: While executing gem ... (OptionParser::InvalidOption)
invalid option: --include-dependencies
at /etc/puppetlabs/puppet/environments/ci/modules/_ruby/manifests/mysql_gem.pp:29
I traced the --include-dependencies
to https://github.com/puppetlabs/puppet/commit/2284e837939628f81149e62fdc0f314ff077a776, it has since been removed, so I removed it from my Puppet provider code on the master in /opt/puppet/lib/site_ruby/1.8/puppet/provider/package/gem.rb
:
def install(useversion = true)
command = [command(:gemcmd), "install"]
command << "-v" << resource[:ensure] if (! resource[:ensure].is_a? Symbol) and useversion
# JOE HAS BEEN HERE - see http://projects.puppetlabs.com/issues/19741,
# https://github.com/puppetlabs/puppet/commit/2284e837939628f81149e62fdc0f314ff077a776
# Always include dependencies
# command << "--include-dependencies"
Unfortunately the code for gem.rb
is inexplicably cached somewhere - I've restarted every service I can think to restart to no avail, I still get the --include-dependencies
option included.
How does one force that provider code to get reloaded on the master to take out the --include-dependencies
when using the gem
provider?