Puppet's yumhelper.py vs. other pythons on the system

1,104 views
Skip to first unread message

johnj...@gmail.com

unread,
Aug 6, 2014, 5:24:42 PM8/6/14
to puppet...@googlegroups.com
When trying to add packages to a CentOS 6 system I am getting chronic errors of the form:

Error: Could not get latest version: Execution of '/usr/local/bin/python /usr/lib/ruby/site_ruby/1.8/puppet/provider/package/yumhelper.py' returned 1: <type 'exceptions.AttributeError'>
Error: /Stage[main]/Jenkins_packages::Centos/Package[subversion]/ensure: change from 1.6.11-10.el6_5 to latest failed: Could not get latest version: Execution of '/usr/local/bin/python /usr/lib/ruby/site_ruby/1.8/puppet/provider/package/yumhelper.py' returned 1: <type 'exceptions.AttributeError'>

whether manually running "puppet agent --test" or letting cron do it for me.

This seems to be because the default root path in CentOS includes /usr/local/bin before /usr/bin, and thus I am getting a user-needed other python version that is a mismatch with the python version that puppet seems to want to play with.

When I run:

"puppet agent --test --path /sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

things seem to work without complaint.

I tried to set that path in /etc/puppet/puppet.conf, but it doesn't seem to work. Should that work?

Jason Antman

unread,
Aug 13, 2014, 8:58:16 AM8/13/14
to puppet...@googlegroups.com
So... there *is* a bug open that relates to this, https://tickets.puppetlabs.com/browse/PUP-2144 (and by extension https://tickets.puppetlabs.com/browse/PUP-1362 which appears to be being worked on, and would fix this).

I don't know if that should work, and I honestly don't know how to set a global path for Puppet. I can think of a few options:
(1) set the path wherever you run puppet from (cron, init script if daemon, etc.)
(2) change the ordering in the default root path
(3) wait for one of the above tickets to be fixed and released

That being said, for future reference, it's generally (I know some will disagree) bad practice to install a non-system-compatible Python in a globally-used path.


--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/45991a27-d387-498a-ab8c-975e387db468%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages