Issue #4845 has been updated by James Turnbull.

Category set to plumbing
Status changed from Unreviewed to Accepted


----------------------------------------
Bug #4845: unhelpful error message when config_version script fails
http://projects.puppetlabs.com/issues/4845

Author: Alan Barrett
Status: Accepted
Priority: Normal
Assignee: 
Category: plumbing
Target version: 
Affected version: 0.25.5
Keywords: 
Branch: 


If the config_version script on the puppetmaster fails, with messages printed 
to stderr, then puppetd on the client reports this error:

<pre>
# /usr/local/sbin/puppetd --onetime --test --noop
err: Could not retrieve catalog from remote server: wrong header line format
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run
</pre>

Extract from puppet.conf file:
<pre>
[puppetmasterd]
config_version = /etc/puppet/scripts/puppetmaster/config_version
</pre>

Contents of config_version script causing the unhelpful error message:
<pre>
#!/bin/sh
echo ERROR >&2
exit 1
</pre>

If the config_version script exits with an error status but does not print 
anything to stderr, then the error message is much more useful:

Contents of config_version script causing a useful error message:
<pre>
#!/bin/sh
exit 1
</pre>

Useful error message with the above config_version file:
<pre>
# /usr/local/sbin/puppetd --onetime --test --noop
err: Could not retrieve catalog from remote server: Error 400 on SERVER: Unable 
to set config_version: Execution of 
'/etc/puppet/scripts/puppetmaster/config_version' returned 1:  on node 
mynode.domain.example
</pre>

Desired behaviour:
The useful error message should be printed whenever the config_version script 
fails.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" 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-bugs?hl=en.

Reply via email to