On Mon, Dec 10, 2012 at 4:40 PM, Daniel Pittman <[email protected]> wrote: > On Mon, Dec 10, 2012 at 3:05 AM, swair shah <[email protected]> wrote: >> >> Here is what I'm doing right now: Instead of compiling catalog everytime >> when a node sends a request to the master, check if the modules included for >> that node are changed or not, if they are changed then only compile the >> catalog. >> >> Q: How will I know which are the modules included in a node? A. a Puppetdb >> query can give me a list of modules included in a node. > > Unfortunately that information isn't in the catalog - the best you > could do is infer which module a class should have come from based on > the name. :( > > Worse, since PuppetDB uses the catalog it also doesn't have this information.
I had a brief conversation with the PuppetDB team about this, and they pointed out that I missed something: The catalog doesn't include the module, but it does include the full path of the file that every resource came from. You could use that to extract the full set of *files* that were compiled, and test if any of those are changed. That is probably a stronger test than which modules have changed; the one thing that could cause you trouble was if the set of files matched by an include wildcard in one of those manifests changed, and you should have a reasonable idea if that is a risk. -- Daniel Pittman ⎋ Puppet Labs Developer – http://puppetlabs.com ♲ Made with 100 percent post-consumer electrons -- You received this message because you are subscribed to the Google Groups "Puppet Developers" 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-dev?hl=en.
