On Tue, 01 Mar 2011, Douglas Garstang wrote:
What is the best way to have an external node script that
encounters an error fail? What should it do? Should it return a
non zero exit code to the OS?
Yes. I am almost sure that works. If not, it's a bug.
Maybe it's caching something.
I think the external node classifier is not re-run if the
facts have not changed. There's a feature request to make
it run every time.
However, it would be nice to have the client error out in such
a way that I know there was a problem with the external node
script loading it's info. Anyone?
Something else I have done, and that might suit you, is let the
node classifier script return an almost-empty non-error result,
like this:
---
parameters:
error_message: "Something is wrong"
classes: []
Then the top-level site.pp can do something like this:
if $error_message {
fail("External node classifier says: $error_message")
}
--apb (Alan Barrett)
--
You received this message because you are subscribed to the Google Groups "Puppet
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.