Issue #14667 has been updated by Ryan Coleman.
Jeff Weiss wrote: > Ryan Coleman wrote: > > I'd like to see the yaml cache stored in Puppet's vardir or its location > > configurable as another option in puppet.conf so that users can manage > > where it's stored, access the configuration value in Puppet manifests and > > otherwise manage where the data is stored. Is that feasible? > > I understand the preference for putting the yaml cache in Puppet's `$vardir`; > however, Facter is standalone and used by things other than Puppet as well, > like MCollective and Razor. The way that we are generating the cache right > now is a cron job that will put the cache in `/var/lib/facter/facts.cache`. > The first pass of the implementation for a shell script called by cron allows > for you to easily edit the location within the shell script. Ok, forget the part about Puppet's vardir, valid point. Will I be able to configure where Facter stores the cache? May I have access to that location in a Fact? ---------------------------------------- Feature #14667: External Cache for Facts https://projects.puppetlabs.com/issues/14667#change-63644 Author: Hailee Kenney Status: Accepted Priority: High Assignee: Category: Target version: 2.0.x Keywords: Branch: Affected Facter version: Facter should have a way to cache values, since some facts take a while to calculate, and don't need to be reevaluated every time Facter is run. However, having an internal cache and setting a TTL for each individual fact may not be the best approach, because of interprocess concurrency and synchronization. Instead, Facter's output of evaluated fact values should be redirected to a yaml file which will probably be be stored in `var/lib/facter/facts.cache` or something along those lines. If users are more concerned with getting facts quickly, and less concerned about avoiding stale fact values, they can specify a cron job which will regenerate the yaml file on an interval specified by the user. Facter will then get the fact values from the file instead of reevaluating them. We will include a shell script that will encapsulate running Facter and outputting to the file which can be run from cron. If instead they are more concerned with fresh facts then speed, the user can choose to to resolve the fact values every time they run Facter. -- 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.
