Beruflich Dokumente
Kultur Dokumente
1 of 3
https://www.safaribooksonline.com/library/view/puppet-types-and/97...
When developing Puppet types and providers, its not uncommon to run into bugs that are hard
to trace and debug. There are a few options in Puppet that will simplify the troubleshooting
process. The option --trace will provide the Ruby stacktrace when Puppet execution fails. This
will give you a file and line number to provide additional insight into the problem at hand.
The Puppet.debug('message') method can be used in conjunction with the Puppet --debug flag to output troubleshooting messages to the console. This is helpful to output variables
and ensure that certain methods are invoked as expected. But its often far more helpful to dive
directly into a debugger. The ruby-debug gem gives you the ability to interactively troubleshoot
by breaking at a specific line in the code:
The post_mortem option allows ruby-debug to enter into an interactive session when an exception occurs:
14-08-2016 01:49
https://www.safaribooksonline.com/library/view/puppet-types-and/97...
2 of 3
Tour
PREV
B. Modules
Explore
Pricing
Enterprise
Sign In
Colophon
14-08-2016 01:49
https://www.safaribooksonline.com/library/view/puppet-types-and/97...
3 of 3
Tour
PREV
B. Modules
Explore
Pricing
Enterprise
Sign In
Colophon
14-08-2016 01:49