Okay, I''m stymied. I set up a rule to kick a new .repo file out to my clients into /etc/yum.repos.d/ called ''lwm.repo''. The rule says: class lwm-repos{ file { "/etc/yum.repos.d/lwm.repo" : owner => "root", group => "root", mode => 444, source => "puppet:///lwm-repos/lwm.repo", notify => Exec["updatecache"] } exec { "updatecache" : path => "/usr/bin:/usr/sbin:/bin", command => "yum makecache", } } The .repo file was disted out, but I started getting: Apr 12 21:29:23 bos-rep-etl01 puppetd[5135]: Caught TERM; calling stop Apr 12 21:29:23 bos-rep-etl01 puppetd[5486]: Reopening log files Apr 12 21:29:23 bos-rep-etl01 puppetd[5486]: Starting Puppet client version 0.25.4 Apr 12 21:29:24 bos-rep-etl01 puppetd[5486]: Could not prefetch package provider ''yum'': Execution of ''/usr/bin/python /usr/lib/ruby/site_ruby/1.8/puppet/provider/package/yumhelper.py'' returned 1: Traceback (most recent call last): File "/usr/lib/ruby/site_ruby/1.8/puppet/provider/package/yumhelper.py", line 115, in ? ypl = pkg_lists(my) File "/usr/lib/ruby/site_ruby/1.8/puppet/provider/package/yumhelper.py", line 40, in pkg_lists my.doTsSetup() File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 72, in doTsSetup return self._getTs() File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 85, in _getTs self._getTsInfo() File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 91, in _getTsInfo self._tsInfo.setDatabases(self.rpmdb, self.pkgSack) File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 537, in <lambda> pkgSack = property(fget=lambda self: self._getSacks(), File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 392, in _getSacks s Apr 12 21:29:24 bos-rep-etl01 puppetd[5486]: (//lwm-repos/Exec[updatecache]/returns) change from notrun to 0 failed: yum makecache returned 1 instead of one of [0] at /etc/puppet/modules/lwm-repos/manifests/init.pp:17 Apr 12 21:29:24 bos-rep-etl01 puppetd[5486]: Finished catalog run in 0.54 seconds Now I cannot make those messages DISAPPEAR. I''ve disabled the Notify, disabled the exec block in the rule, heck even commented out the ''include'' in the nodes.pp that includes that module. I added ignorecache to the client puppetd.conf file, but no dice there either. Questions : is this the proper way to get a .repo out onto the client machine? And... what''s causing this error message? Server: CentOS 5.4 puppetmaster 0.25.4 Client: CentOS 5.2 puppetd 0.25.4 Help please! -d -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Patrick
2010-Apr-13 06:23 UTC
Re: [Puppet Users] Yum repo update now causing failure in client.
It looks to me like yum itself is broken. Try installing something using the yum command-line client. On Apr 12, 2010, at 7:24 PM, dbs wrote:> Okay, I''m stymied. I set up a rule to kick a new .repo file out to > my > clients into /etc/yum.repos.d/ called ''lwm.repo''. > > The rule says: > class lwm-repos{ > > file { "/etc/yum.repos.d/lwm.repo" : > owner => "root", > group => "root", > mode => 444, > source => "puppet:///lwm-repos/lwm.repo", > notify => Exec["updatecache"] > } > > exec { "updatecache" : > path => "/usr/bin:/usr/sbin:/bin", > command => "yum makecache", > } > } > > The .repo file was disted out, but I started getting: > > Apr 12 21:29:23 bos-rep-etl01 puppetd[5135]: Caught TERM; calling stop > Apr 12 21:29:23 bos-rep-etl01 puppetd[5486]: Reopening log files > Apr 12 21:29:23 bos-rep-etl01 puppetd[5486]: Starting Puppet client > version 0.25.4 > Apr 12 21:29:24 bos-rep-etl01 puppetd[5486]: Could not prefetch > package > provider ''yum'': Execution of ''/usr/bin/python > /usr/lib/ruby/site_ruby/1.8/puppet/provider/package/yumhelper.py'' > returned 1: Traceback (most recent call last): File > "/usr/lib/ruby/site_ruby/1.8/puppet/provider/package/yumhelper.py", > line > 115, in ? ypl = pkg_lists(my) File > "/usr/lib/ruby/site_ruby/1.8/puppet/provider/package/yumhelper.py", > line > 40, in pkg_lists my.doTsSetup() File > "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 72, in > doTsSetup return self._getTs() File > "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 85, in > _getTs > self._getTsInfo() File > "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 91, in > _getTsInfo self._tsInfo.setDatabases(self.rpmdb, self.pkgSack) > File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 537, in > <lambda> pkgSack = property(fget=lambda self: self._getSacks(), > File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 392, in > _getSacks s > Apr 12 21:29:24 bos-rep-etl01 puppetd[5486]: > (//lwm-repos/Exec[updatecache]/returns) change from notrun to 0 > failed: > yum makecache returned 1 instead of one of [0] at > /etc/puppet/modules/lwm-repos/manifests/init.pp:17 > Apr 12 21:29:24 bos-rep-etl01 puppetd[5486]: Finished catalog run in > 0.54 seconds > > Now I cannot make those messages DISAPPEAR. I''ve disabled the Notify, > disabled the exec block in the rule, heck even commented out the > ''include'' in the nodes.pp that includes that module. I added > ignorecache to the client puppetd.conf file, but no dice there either. > > Questions : is this the proper way to get a .repo out onto the client > machine? > > And... what''s causing this error message? > > Server: CentOS 5.4 puppetmaster 0.25.4 > Client: CentOS 5.2 puppetd 0.25.4 > > Help please! > > -d > > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Ken
2010-Apr-13 07:42 UTC
[Puppet Users] Re: Yum repo update now causing failure in client.
> Questions : is this the proper way to get a .repo out onto the client > machine?There is a resource type specifically for this. http://docs.puppetlabs.com/references/stable/type.html#yumrepo> And... what''s causing this error message?You probably wanted the refreshonly => true attribute on that exec - so it would only run when the file was updated (ie. the notify would force it to run). At the moment its always going to run which is probably not what you intended. What happens when you run yum makecache on the command line? Perhaps there is a mistake somewhere. Puppet won''t show you the command output by default ... so try running it yourself and seeing what the problem is. Also - as far as the ''cache'' not being cleared even after you removed the exec block .... I''m guessing you''ve tried touching the /etc/puppet/ manifests/site.pp file, or restarting your puppet master? The exec might still be cached on the server perhaps? ken. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
dbs
2010-Apr-13 13:24 UTC
[Puppet Users] Re: Yum repo update now causing failure in client.
On Apr 13, 2:23 am, Patrick <kc7...@gmail.com> wrote:> It looks to me like yum itself is broken. Try installing something using the yum command-line client.Oddly, it looked like we had a problem with one of the repos (404 error), which somehow trickled all the way back. I also put in the ''refreshonly=>true'' option into the exec block... restarted puppetmasterd on the server and got a clean catalog run. Now I may have hit another problem. I go onto my pupetmasterserver, and touch / modify the lwm.repo file (removed a bunch of comments). On my client, I kill -USR1 puppetd which forces a catalog rerun, but the file does NOT show up on the client. I have ignorecache=true in both the server and the client puppetd.conf files, and I''ve restarted the puppetmaster. Both machines are synced via ntp correctly. This seems pretty basic? :) -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
dbs
2010-Apr-13 13:34 UTC
[Puppet Users] Re: Yum repo update now causing failure in client.
Wait, scratch that, ignore this. I still had the module commented out in nodes.pp Sorry for the false alarm! Updates are running correctly! Stand down! (thanks to everyone for their help on the repos - we seem okay now) On Apr 13, 9:24 am, dbs <dbelfershev...@gmail.com> wrote:> On Apr 13, 2:23 am, Patrick <kc7...@gmail.com> wrote: > > > It looks to me like yum itself is broken. Try installing something using the yum command-line client. > > Oddly, it looked like we had a problem with one of the repos (404 > error), which somehow trickled all the way back. I also put in the > ''refreshonly=>true'' option into the exec block... restarted > puppetmasterd on the server and got a clean catalog run. > > Now I may have hit another problem. > > I go onto my pupetmasterserver, and touch / modify the lwm.repo file > (removed a bunch of comments). > > On my client, I kill -USR1 puppetd which forces a catalog rerun, but > the file does NOT show up on the client. > > I have ignorecache=true in both the server and the client puppetd.conf > files, and I''ve restarted the puppetmaster. > > Both machines are synced via ntp correctly. > > This seems pretty basic? :)-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.