Hi working with the following puppet-0.24.1-1 puppet-server-0.24.1-1 ruby-1.8.1-7.EL3.8 rhel3 u8 The puppetmaster is running on rhel4 u5 I am working with puppet and rhel3 u8 and I have any an issue anytime I ask puppet to interact with yum for the record - yum from the cli works perfectly I setup a class to manage ntpd and in the class I have the following function # make sure ntpd is updated package {''ntp'': ensure => latest } } Anytime puppet makes a run I get the following error Feb 4 16:40:42 tucapd171 puppetd[25077]: Starting catalog run Feb 4 16:40:43 tucapd171 puppetd[25077]: Could not prefetch package provider ''yum'': Execution of ''/usr/bin/python /usr/lib/site_ruby/1.8/puppet/provider/package/yumhelper.py'' returned 256: Traceback (most recent call last): File "/usr/lib/site_ruby/1.8/puppet/provider/package/yumhelper.py", line 7, in ? import yum ImportError: No module named yum Feb 4 16:40:43 tucapd171 puppetd[25077]: Finished catalog run in 0.97seconds I have seen a similar error in the list but I am not sure this is the same issue - any ideas? We are trying to transition from using rhn satellite and being able to use puppet and yum together would be awesome. Thanks Ed _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
On 04/02/2008, Edward Bailey <eds.mailing.list.account@gmail.com> wrote:> Hi > > working with the following > > puppet-0.24.1-1 > puppet-server-0.24.1-1 > ruby-1.8.1-7.EL3.8 > rhel3 u8 > > The puppetmaster is running on rhel4 u5 > > > I am working with puppet and rhel3 u8 and I have any an issue anytime I ask > puppet to interact with yum > > for the record - yum from the cli works perfectly > > I setup a class to manage ntpd and in the class I have the following > function > > > # make sure ntpd is updated > > package {''ntp'': > ensure => latest > } > } > > > Anytime puppet makes a run I get the following error > > Feb 4 16:40:42 tucapd171 puppetd[25077]: Starting catalog run > Feb 4 16:40:43 tucapd171 puppetd[25077]: Could not prefetch package > provider ''yum'': Execution of ''/usr/bin/python > /usr/lib/site_ruby/1.8/puppet/provider/package/yumhelper.py'' > returned 256: Traceback (most recent call last): File > "/usr/lib/site_ruby/1.8/puppet/provider/package/yumhelper.py", > line 7, in ? import yum ImportError: No module named yum > Feb 4 16:40:43 tucapd171 puppetd[25077]: Finished catalog run in 0.97 > seconds > > I have seen a similar error in the list but I am not sure this is the same > issue - any ideas? We are trying to transition from using rhn satellite and > being able to use puppet and yum together would be awesome.I''m not completely sure why your getting the error you are but yum wasn''t installed by default until rhel5. Prior to that up2date was used. Perhaps you need to specify the provider as detailed in the link below. Up2date can use yum repositories so perhaps that''s another way to go. http://reductivelabs.com/trac/puppet/wiki/TypeReference#package hth, Kent
we have had some issues with using up2date to resolve dependencies plus we dont really like satellite anyway hence the move to yum. we have been testing yum for awhile now and have not found any issues with using it from the cli well I changed the function to # make sure ntpd is updated package {''ntp'': ensure => latest, provider => yum } and restarted the master and got the same results Feb 4 17:35:45 tucapd171 puppetd[2454]: Starting Puppet client version 0.24.1 Feb 4 17:35:47 tucapd171 puppetd[2454]: Starting catalog run Feb 4 17:35:47 tucapd171 puppetd[2454]: Could not prefetch package provider ''yum'': Execution of ''/usr/bin/python /usr/lib/site_ruby/1.8/puppet/provider/package/yumhelper.py'' returned 256: Traceback (most recent call last): File "/usr/lib/site_ruby/1.8/puppet/provider/package/yumhelper.py", line 7, in ? import yum ImportError: No module named yum Feb 4 17:35:48 tucapd171 puppetd[2454]: Finished catalog run in 0.97seconds Any other ideas? On Feb 4, 2008 5:17 PM, Kenton Brede <kbrede@gmail.com> wrote:> On 04/02/2008, Edward Bailey <eds.mailing.list.account@gmail.com> wrote: > > Hi > > > > working with the following > > > > puppet-0.24.1-1 > > puppet-server-0.24.1-1 > > ruby-1.8.1-7.EL3.8 > > rhel3 u8 > > > > The puppetmaster is running on rhel4 u5 > > > > > > I am working with puppet and rhel3 u8 and I have any an issue anytime I > ask > > puppet to interact with yum > > > > for the record - yum from the cli works perfectly > > > > I setup a class to manage ntpd and in the class I have the following > > function > > > > > > # make sure ntpd is updated > > > > package {''ntp'': > > ensure => latest > > } > > } > > > > > > Anytime puppet makes a run I get the following error > > > > Feb 4 16:40:42 tucapd171 puppetd[25077]: Starting catalog run > > Feb 4 16:40:43 tucapd171 puppetd[25077]: Could not prefetch package > > provider ''yum'': Execution of ''/usr/bin/python > > /usr/lib/site_ruby/1.8/puppet/provider/package/yumhelper.py'' > > returned 256: Traceback (most recent call last): File > > "/usr/lib/site_ruby/1.8/puppet/provider/package/yumhelper.py", > > line 7, in ? import yum ImportError: No module named yum > > Feb 4 16:40:43 tucapd171 puppetd[25077]: Finished catalog run in 0.97 > > seconds > > > > I have seen a similar error in the list but I am not sure this is the > same > > issue - any ideas? We are trying to transition from using rhn satellite > and > > being able to use puppet and yum together would be awesome. > > I''m not completely sure why your getting the error you are but yum > wasn''t installed by default until rhel5. Prior to that up2date was > used. Perhaps you need to specify the provider as detailed in the > link below. Up2date can use yum repositories so perhaps that''s > another way to go. > > http://reductivelabs.com/trac/puppet/wiki/TypeReference#package > > hth, > Kent > _______________________________________________ > Puppet-users mailing list > Puppet-users@madstop.com > https://mail.madstop.com/mailman/listinfo/puppet-users >_______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Edward Bailey wrote: | Feb 4 17:35:45 tucapd171 puppetd[2454]: Starting Puppet client version | 0.24.1 | Feb 4 17:35:47 tucapd171 puppetd[2454]: Starting catalog run | Feb 4 17:35:47 tucapd171 puppetd[2454]: Could not prefetch package | provider ''yum'': Execution of ''/usr/bin/python | /usr/lib/site_ruby/1.8/puppet/provider/package/yumhelper.py'' returned | 256: Traceback (most recent call last): File | "/usr/lib/site_ruby/1.8/puppet/provider/package/yumhelper.py", line 7, | in ? import yum ImportError: No module named yum | Feb 4 17:35:48 tucapd171 puppetd[2454]: Finished catalog run in 0.97 That looks like the yumhelper.py script is failing because the "import yum" function fails. This suggets the yum module is missing. See the following: http://www.linuxforums.org/forum/redhat-fedora-linux-help/75490-yum-python-import-error.html and: Q. 7: I installed a new version of yum (or upgraded my whole system) and now when I run yum, I get an error saying "The yum libraries do not seem to be available on your system for this version of python" and "Please make sure the package you used to install yum was built for your install of python." What''s wrong with the yum package I''ve got, or my Python installation, and how do I fix it? A. In pre-2.3.? yum This error message is often misleading. To see the real error, run python from the command line, and type import yum. The problem probably isn''t with your version of python at all, but with a missing libxml2-python, python-sqlite, or python-elementtree package. Yum 2.4.x provides a different error with the module import errors, so this will become less confusing. It also includes a directive to send the error to the mailing list. Really, you should figure out what rpm provides the module that was missing and try to install that. If you are getting a message that yum itself is the missing module then you probably installed it incorreclty (or installed the source rpm using make/make install). If possible, find a prebuilt rpm that will work for your system like one from Fedora or CentOS. Or, you can download the srpm and do a rpmbuild --rebuild yum*.src.rpm Regards James Turnbull - -- James Turnbull (james@lovedthanlost.net) - -- Author of: - - Pulling Strings with Puppet (http://www.amazon.com/gp/product/1590599780/) - - Pro Nagios 2.0 (http://www.amazon.com/gp/product/1590596099/) - - Hardening Linux (http://www.amazon.com/gp/product/1590594444/) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHp5ma9hTGvAxC30ARAp+NAJ9+WL0rjY943jOCwuj363gVoXUQ6gCgo418 LpVkf+Q3OtxzSLwXGy7OCI4=QCPX -----END PGP SIGNATURE-----
Thanks - i do see if I invoke python i cannot import the yum module The yum rpm I am using is straight from centos 3.8 realease. I will try out your idea about the source rpm. I am going to research using your tip and see what I can find out. Can''t wait to read your book Ed On Feb 4, 2008 6:02 PM, James Turnbull <james@lovedthanlost.net> wrote:> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Edward Bailey wrote: > > | Feb 4 17:35:45 tucapd171 puppetd[2454]: Starting Puppet client version > | 0.24.1 > | Feb 4 17:35:47 tucapd171 puppetd[2454]: Starting catalog run > | Feb 4 17:35:47 tucapd171 puppetd[2454]: Could not prefetch package > | provider ''yum'': Execution of ''/usr/bin/python > | /usr/lib/site_ruby/1.8/puppet/provider/package/yumhelper.py'' returned > | 256: Traceback (most recent call last): File > | "/usr/lib/site_ruby/1.8/puppet/provider/package/yumhelper.py", line 7, > | in ? import yum ImportError: No module named yum > | Feb 4 17:35:48 tucapd171 puppetd[2454]: Finished catalog run in 0.97 > > That looks like the yumhelper.py script is failing because the "import > yum" function fails. This suggets the yum module is missing. See the > following: > > > http://www.linuxforums.org/forum/redhat-fedora-linux-help/75490-yum-python-import-error.html > > and: > > Q. 7: I installed a new version of yum (or upgraded my whole system) and > now when I run yum, I get an error saying "The yum libraries do not seem > to be available on your system for this version of python" and "Please > make sure the package you used to install yum was built for your install > of python." What''s wrong with the yum package I''ve got, or my Python > installation, and how do I fix it? > > A. > > In pre-2.3.? yum This error message is often misleading. To see the real > error, run python from the command line, and type import yum. The > problem probably isn''t with your version of python at all, but with a > missing libxml2-python, python-sqlite, or python-elementtree package. > > Yum 2.4.x provides a different error with the module import errors, so > this will become less confusing. > > It also includes a directive to send the error to the mailing list. > Really, you should figure out what rpm provides the module that was > missing and try to install that. > > If you are getting a message that yum itself is the missing module then > you probably installed it incorreclty (or installed the source rpm using > make/make install). If possible, find a prebuilt rpm that will work for > your system like one from Fedora or CentOS. Or, you can download the > srpm and do a > > rpmbuild --rebuild yum*.src.rpm > > Regards > > James Turnbull > > - -- > James Turnbull (james@lovedthanlost.net) > - -- > Author of: > - - Pulling Strings with Puppet > (http://www.amazon.com/gp/product/1590599780/) > - - Pro Nagios 2.0 > (http://www.amazon.com/gp/product/1590596099/) > - - Hardening Linux > (http://www.amazon.com/gp/product/1590594444/) > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.7 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iD8DBQFHp5ma9hTGvAxC30ARAp+NAJ9+WL0rjY943jOCwuj363gVoXUQ6gCgo418 > LpVkf+Q3OtxzSLwXGy7OCI4> =QCPX > -----END PGP SIGNATURE----- > _______________________________________________ > Puppet-users mailing list > Puppet-users@madstop.com > https://mail.madstop.com/mailman/listinfo/puppet-users >_______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
finally got everything to work by back-porting yum 2.4 to rhel3 otherwise puppet will not work with any earlier version of yum - dag''s repo is a great place to look for the various dependencies and then grab the yum 2.4 source rpm and recompile on a rhel3 servers. if anyone needs help with this process let me know. Ed On Feb 4, 2008 6:19 PM, Edward Bailey <eds.mailing.list.account@gmail.com> wrote:> Thanks - i do see if I invoke python i cannot import the yum module > > The yum rpm I am using is straight from centos 3.8 realease. I will try > out your idea about the source rpm. I am going to research using your tip > and see what I can find out. > > Can''t wait to read your book > > Ed > > > On Feb 4, 2008 6:02 PM, James Turnbull <james@lovedthanlost.net> wrote: > > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > Edward Bailey wrote: > > > > | Feb 4 17:35:45 tucapd171 puppetd[2454]: Starting Puppet client > > version > > | 0.24.1 > > | Feb 4 17:35:47 tucapd171 puppetd[2454]: Starting catalog run > > | Feb 4 17:35:47 tucapd171 puppetd[2454]: Could not prefetch package > > | provider ''yum'': Execution of ''/usr/bin/python > > | /usr/lib/site_ruby/1.8/puppet/provider/package/yumhelper.py'' returned > > | 256: Traceback (most recent call last): File > > | "/usr/lib/site_ruby/1.8/puppet/provider/package/yumhelper.py", line 7, > > | in ? import yum ImportError: No module named yum > > | Feb 4 17:35:48 tucapd171 puppetd[2454]: Finished catalog run in 0.97 > > > > That looks like the yumhelper.py script is failing because the "import > > yum" function fails. This suggets the yum module is missing. See the > > following: > > > > > > http://www.linuxforums.org/forum/redhat-fedora-linux-help/75490-yum-python-import-error.html > > > > and: > > > > Q. 7: I installed a new version of yum (or upgraded my whole system) and > > now when I run yum, I get an error saying "The yum libraries do not seem > > to be available on your system for this version of python" and "Please > > make sure the package you used to install yum was built for your install > > of python." What''s wrong with the yum package I''ve got, or my Python > > installation, and how do I fix it? > > > > A. > > > > In pre-2.3.? yum This error message is often misleading. To see the real > > error, run python from the command line, and type import yum. The > > problem probably isn''t with your version of python at all, but with a > > missing libxml2-python, python-sqlite, or python-elementtree package. > > > > Yum 2.4.x provides a different error with the module import errors, so > > this will become less confusing. > > > > It also includes a directive to send the error to the mailing list. > > Really, you should figure out what rpm provides the module that was > > missing and try to install that. > > > > If you are getting a message that yum itself is the missing module then > > you probably installed it incorreclty (or installed the source rpm using > > make/make install). If possible, find a prebuilt rpm that will work for > > your system like one from Fedora or CentOS. Or, you can download the > > srpm and do a > > > > rpmbuild --rebuild yum*.src.rpm > > > > Regards > > > > James Turnbull > > > > - -- > > James Turnbull (james@lovedthanlost.net) > > - -- > > Author of: > > - - Pulling Strings with Puppet > > (http://www.amazon.com/gp/product/1590599780/) > > - - Pro Nagios 2.0 > > (http://www.amazon.com/gp/product/1590596099/) > > - - Hardening Linux > > (http://www.amazon.com/gp/product/1590594444/) > > -----BEGIN PGP SIGNATURE----- > > Version: GnuPG v1.4.7 (MingW32) > > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > > > iD8DBQFHp5ma9hTGvAxC30ARAp+NAJ9+WL0rjY943jOCwuj363gVoXUQ6gCgo418 > > LpVkf+Q3OtxzSLwXGy7OCI4> > =QCPX > > -----END PGP SIGNATURE----- > > _______________________________________________ > > Puppet-users mailing list > > Puppet-users@madstop.com > > https://mail.madstop.com/mailman/listinfo/puppet-users > > > >_______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users