I am just learning puppet and as can be expected I am making lots and lots of mistakes. One thing I find very frustrating is that the puppet client seems to fail very silently even when I run it manually. When I am debugging I use the command line. puppetd --server myserver.com --test --logdest console --verbose -- noop --onetime --debug --test --trace I am expecting that a file should exist someplace after the puppet client runs this, the file is not there and there are no errors. What happens when puppetd is running unattended? How will I know I made a mistake or that some task failed? Can I configure puppet to email me all the errors or if puppet can''t apply any formula? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
timu wrote:> I am just learning puppet and as can be expected I am making lots and > lots of mistakes. > > One thing I find very frustrating is that the puppet client seems to > fail very silently even when I run it manually. > > When I am debugging I use the command line. > > puppetd --server myserver.com --test --logdest console --verbose -- > noop --onetime --debug --test --trace > > I am expecting that a file should exist someplace after the puppet > client runs this, the file is not there and there are no errors. > > What happens when puppetd is running unattended? How will I know I > made a mistake or that some task failed? > > Can I configure puppet to email me all the errors or if puppet can''t > apply any formula? > > >As long as you are on a recent version there is an ''err'' tag, which you can use in conjunction with tagmail to mail you any errors. I send mine to a distribution group that ends up going to my team mates. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
>> > As long as you are on a recent version there is an ''err'' tag, which you > can use in conjunction with tagmail to mail you any errors. I send mine > to a distribution group that ends up going to my team mates. >I didn''t see anything in the documentation about this but I''ll see if I can track it down. Unfortunately this won''t fix my current problem which is that things are not working and there are no errors. I tried running the puppetmasterd with --no-daemon --debug and the client with every switch I can think of but I don''t see an error anywhere. I made a purposeful error in the configuration to make sure the class was being run and I got an error message. Supposedly the script is being run but the end result of the script doesn''t exist. Here is the class. class bash{ file { "dir_colors" : mode => 644, owner => root, group => root, ensure => file, path => "/etc/DIR_COLORS", #source => "puppet://$fileserver/bash/dir_colors" content => template("bash/templates/dir_colors") } } Presumably I have made some sort of a mistake here and that''s why the DIR_COLORS file doesn''t show up like it should. Maybe I made a mistake in my paths, maybe I made a mistake with the filebucket, maybe I have a syntax error in there someplace. maybe it can''t find the file or something. It doesn''t tell me what mistake I am making. That''s the frustrating bit. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
> > class bash{ > file { "dir_colors" : > > mode => 644, > owner => root, > group => root, > ensure => file, > path => "/etc/DIR_COLORS", > #source => "puppet://$fileserver/bash/dir_colors" > content => template("bash/templates/dir_colors") > } > } >If you are running with --noop, puppet shouldn''t do anything. I''d also delete ''ensure => file,'', which might be confusing things as well. Try running with --no-daemonize which will explicitly give you logs on stdout. That will at least give us the output when the file resource is evaluated on the client. Try this and put the relevant output in a gist or pastie if you are still having issues: puppetd --server myserver.com --no-daemonize --onetime --debug --trace --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Sun, Sep 6, 2009 at 2:39 PM, Andrew Shafer <andrew@reductivelabs.com>wrote:> > > > > class bash{ > > file { "dir_colors" : > > > > mode => 644, > > owner => root, > > group => root, > > ensure => file, > > path => "/etc/DIR_COLORS", > > #source => "puppet://$fileserver/bash/dir_colors" > > content => template("bash/templates/dir_colors") > > } > > } > > > > I know this much -><- about templates, but I am always leery about relative > paths in puppet, and documentation notwithstanding I always end every entry > in a file resource with a comma ",". So, >> content => template("bash/templates/dir_colors"), >Cheers-- Charles --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
> If you are running with --noop, puppet shouldn''t do anything. > > I''d also delete ''ensure => file,'', which might be confusing things as well. > > Try running with --no-daemonize which will explicitly give you logs on > stdout. That will at least give us the output when the file resource > is evaluated on the client. > > Try this and put the relevant output in a gist or pastie if you are > still having issues: > puppetd --server myserver.com --no-daemonize --onetime --debug --trace >I have spent the entire morning trying to sort this out and got it working but with errors. Every time I run the client I get the following error err: /File[/var/lib/puppet/lib]: Failed to retrieve current state of resource: Could not retrieve information from source(s) puppet://tim-laptop.panztel.local/plugins I have the plugins directory and I have it specified in the fileserver.conf like this [plugins] path /usr/local/home/tim/puppet/etc/plugins allow * of course if I turn off "pluginsync=true" in the config file I don''t get that. I am also getting lots of debug messages like this . debug: Puppet::Network::Format[json]: false value when expecting true debug: Format s not supported for Puppet::FileServing::Metadata; has not implemented method ''from_s'' debug: Puppet::Network::Format[json]: false value when expecting true debug: Format s not supported for Puppet::FileServing::Metadata; has not implemented method ''from_s'' The good news is that the DIR_COLORS is showing up and with the proper content whether it comes from templates or the files directory (YEA!). --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
If you turn off pluginsync = true, does it work? or you just don''t get that message? What version of Ruby are you running? On Sun, Sep 6, 2009 at 6:23 PM, Tim Uckun<timuckun@gmail.com> wrote:> >> If you are running with --noop, puppet shouldn''t do anything. >> >> I''d also delete ''ensure => file,'', which might be confusing things as well. >> >> Try running with --no-daemonize which will explicitly give you logs on >> stdout. That will at least give us the output when the file resource >> is evaluated on the client. >> >> Try this and put the relevant output in a gist or pastie if you are >> still having issues: >> puppetd --server myserver.com --no-daemonize --onetime --debug --trace >> > > > I have spent the entire morning trying to sort this out and got it > working but with errors. > > Every time I run the client I get the following error > > err: /File[/var/lib/puppet/lib]: Failed to retrieve current state of > resource: Could not retrieve information from source(s) > puppet://tim-laptop.panztel.local/plugins > > I have the plugins directory and I have it specified in the > fileserver.conf like this > > [plugins] > path /usr/local/home/tim/puppet/etc/plugins > allow * > > of course if I turn off "pluginsync=true" in the config file I don''t get that. > > > I am also getting lots of debug messages like this . > > > debug: Puppet::Network::Format[json]: false value when expecting true > debug: Format s not supported for Puppet::FileServing::Metadata; has > not implemented method ''from_s'' > debug: Puppet::Network::Format[json]: false value when expecting true > debug: Format s not supported for Puppet::FileServing::Metadata; has > not implemented method ''from_s'' > > The good news is that the DIR_COLORS is showing up and with the proper > content whether it comes from templates or the files directory (YEA!). > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Mon, Sep 7, 2009 at 6:53 PM, Andrew Shafer<andrew@reductivelabs.com> wrote:> > If you turn off pluginsync = true, does it work? or you just don''t get > that message?The error about plugins go away but the "from_s" debug messages remain.> What version of Ruby are you running? > >whatever apt-get gives me. I am pretty sure it''s 1.8.7.X --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---