Puppet Troubleshooting: Compiling Catalog, Locating a Cached Catalog

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

Copyright © 2024 Jakub Holý
Powered by Cryogen
Theme by KingMob