Issue #13505 has been updated by Chris Price.

Status changed from Unreviewed to Needs More Information
Assignee set to Trevor Vaughan

This might be an issue that we should route to our documentation team; the 
"--trace" argument basically just toggles whether or not backtraces are printed 
out when you hit one of our existing exception handling blocks.  If you are not 
handling exceptions in your custom type, or if the error you're dealing with 
doesn't happen to be caught by one of our blocks, then you are correct that 
"--trace" won't appear to do anything.

In the master branch we've made some improvements around this.  With the next 
release of puppet you'll be able to call "Puppet.log_exception(err)" and that 
will automatically handle the "--trace" option for you.

For current versions of puppet (2.7.x) your best bet is probably to put a 
"begin/rescue/end" clause in your code and then you can print "err.backtrace" 
for yourself.

If that doesn't help you, try "--debug", and paste whatever output that you are 
seeing into the ticket, we'll be happy to try to help narrow it down... and we 
appreciate input on how error messaging can be improved going forward--that is 
a focal point for us right now.
----------------------------------------
Bug #13505: Using --trace  with custom functions is useless on the puppet 
client.
https://projects.puppetlabs.com/issues/13505#change-58917

Author: Trevor Vaughan
Status: Needs More Information
Priority: Low
Assignee: Trevor Vaughan
Category: 
Target version: 
Affected Puppet version: 
Keywords: custom type, trace, debugging
Branch: 


Several times now, when working on a custom type, I've had a failure and tried 
running puppet with --trace.

This turned out to be completely useless and always stops at the indirector.

Adding --trace to the puppet *server* works, but that requires taking down the 
server or setting it up to always trace.

It would be ideal if --trace could actually pinpoint the error on the client 
run.


-- 
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