4

puppetrun doesn't report errors my puppetclients encounter. for instance, if I put jibberish into site.pp and run puppetd --test on the clients I get an error. if I run puppetrun on the puppetmaster it says the client finished with exit code 0. After some sleuthing I found that puppetrun will not say if the update was good/bad.

So my question is then- If I push out changes to the clients with puppetrun is there a quick and easy way to tell if an error had occurred on the client?

David Schmitt
  • 2,185
  • 2
  • 15
  • 25

2 Answers2

3

I think you are attacking the problem in the wrong end: you should do some checking on your puppet files before you make them active on your puppetmaster.

The easiest way to check the syntax is to use:

puppetd --parseonly --confdir=/path/to/dir --vardir=/tmp/puppet

which should return "Syntax OK" if all is well. You can also dry run puppet using:

puppetd --test --noop --confdir=/path/to/dir --vardir=/tmp/puppet

It will show you what it is going to change, so you can verify that it is doing what you expect before you let your puppet clients use the new changes you introduced.

Martin
  • 809
  • 4
  • 6
0

There is a whole reporting structure in puppet that you can configure, then you have have clients email in errors etc. Puppetrun only reports the status of contacting a node and it's ability to kick off a run. Ie if puppet isn't running on a node or if for some reason it can't wake up and do a run it'll report an error, otherwise from puppetrun's perspective it was successful.

Stick
  • 658
  • 4
  • 10
  • thank you- I looked into that and it does help. I'm still not sure how to handle this case- I accidently introduce an error into a manifest file and it gets distributed. The error will occur on the client and won't make it back to the puppet reporting system. How would I check for this? Would I need to setup something listening on the puppet client syslog watching for puppetd errors and if found, e-mail them to me? –  May 29 '09 at 21:44