Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
PUP 4.2.2
-
None
-
None
-
1
-
RE 2015-10-28, RE 2015-11-04, RE 2015-11-11
-
Bug Fix
-
Description
OS: CentOS 6.x
Puppet 4.2.2: puppet-agent-1.2.4-1.el6.x86_64 AND puppet-agent-1.2.6-1.el6.x86_64
Puppet is installing gems into the puppet provided ruby and not into the system ruby.
Steps to reproduce:
Add this to your node manifest:
package
run "sudo service puppet restart" on your node.
run "gem list" - You will find no redis gem.
run "/opt/puppetlabs/puppet/bin/gem list" - Redis gem will be installed here!
With some help from the folks on IRC, I found that the init script shipped by puppetlabs has a path which causes the puppet daemon/service to use the puppet provided gem binary vs the system's gem binary.
$ cat /etc/init.d/puppet |grep PATH
PATH=/opt/puppetlabs/puppet/bin:/usr/bin:/sbin:/bin:/usr/sbin
If I remove "/opt/puppetlabs/puppet/bin" from the path line and restart the service, the puppet deamon does the right thing and installs the gem into the system ruby.