On 1/9/15 8:40 PM, Jason Price wrote:
> Puppet version 3.7.3
>
> Master and agent are running on Centos v7.0
>
> When the manifest includes the following block, it fails with the error
> below:
>
> code block:
>
> package {'s3cmd':
> ensure => present,
> provider => 'pip',
> require => Package['python-pip']
> }
>
> (for reference, the python-pip package installs just fine). The error:
>
> $ sudo puppet agent -t
> Notice: Ignoring --listen on onetime run
> Info: Retrieving pluginfacts
> Info: Retrieving plugin
> Info: Loading facts
> Info: Caching catalog for
toy9x123.analytics-qa.weather.com
> <
http://toy9x123.analytics-qa.weather.com>
> Info: Applying configuration version '1420853760'
> *Error: Could not set 'present' on ensure: Could not locate the pip
> command. at 35:/etc/puppet/modules/etc/manifests/packages.pp
> Error: Could not set 'present' on ensure: Could not locate the pip
> command. at 35:/etc/puppet/modules/etc/manifests/packages.pp*
> Wrapped exception:
> Could not locate the pip command.
> Error: /Stage[main]/Etc::Packages/Package[s3cmd]/ensure: change from
> absent to present failed: Could not set 'present' on ensure: Could not
> locate the pip command. at 35:/etc/puppet/modules/etc/manifests/packages.pp
>
> so, this is odd. I've done some googling that indicates that a $PATH
> issue might be in play, but when I do things like 'sudo which pip' I get
> '/bin/pip' (centos symlinks /bin to /usr/bin). I've validated that pip
> can install s3cmd without issue. The manifest still fails even if s3cmd
> is installed, so it's completely a problem with how puppet is trying to
> call pip.
>
> Any insights?
>
> Thank you;
> Jason
Hi Jason,
You found a bug in the pip package provider. It is incorrectly looking
for pip-python in your path. I have created a ticket[1] for this issue
along with the correspond patch[2] to fix it. A quick hack would be to
symlink /usr/bin/pip-python to /usr/bin/pip.
[1] -
https://tickets.puppetlabs.com/browse/PUP-3829
[2] -
https://github.com/puppetlabs/puppet/pull/3468
Best regards,
-g
--
Garrett Honeycutt
@learnpuppet
Puppet Training with LearnPuppet.com
Mobile:
+1.206.414.8658