4

Puppet Troubleshooting: Compiling Catalog, Locating a Cached Catalog

 2 years ago
source link: https://blog.jakubholy.net/2012/10/17/puppet-where-to-find-the-cached-catalog-on-client/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Puppet Troubleshooting: Compiling Catalog, Locating a Cached Catalog

October 17, 2012
Few troubleshooting tips for Puppet.

Where to Find the Cached Catalog On Client

Puppet Agent caches its compiled (text/Ruby) catalog under its $vardir, for example Puppet 0.25.x stores it into /var/lib/puppet/client_yaml/catalog/<hostname>.yaml. It might be useful when troubleshooting.

Compiling Catalog Manually

You can compile the catalog for a particular node manually on the Puppet Master. Ex.:
puppetmasterd --compile mynode.example.com > mynode_catalog


The compilation uses locally cached facts, typically in /var/lib/puppet/yaml/facts/<hostname>.yaml .

You can try the catalog manually on the node (though retrieving files via puppet://puppet/... will fail). You will first need delete the leading lines with messages/warnings from the compilation process, if any (such as "[warning] ..."):
puppet --noop --apply mynode_catalog
Tags: DevOps

Are you benefitting from my writing? Consider buying me a coffee or supporting my work via GitHub Sponsors. Thank you! You can also book me for a mentoring / pair-programming session via Codementor or (cheaper) email.

Allow me to write to you!

Let's get in touch! I will occasionally send you a short email with a few links to interesting stuff I found and with summaries of my new blog posts. Max 1-2 emails per month. I read and answer to all replies.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK