Uploaded image for project: 'Facter'
  1. Facter
  2. FACT-2331

Add the ability to cache and block the output of custom facts

    XMLWordPrintable

Details

    • Hide
      • Custom Ruby facts can be cached via entries to the `ttls` config field
      • Custom Ruby facts can be blocked via entries to the `blocklist` config field
      • CLI options around caching and blocking take into account custom Ruby facts
      Show
      Custom Ruby facts can be cached via entries to the `ttls` config field Custom Ruby facts can be blocked via entries to the `blocklist` config field CLI options around caching and blocking take into account custom Ruby facts
    • Night's Watch
    • ghost-19
    • Reviewed
    • Enhancement
    • Hide
      Users can define their own custom groups in `facter.conf` using the new `fact-groups` group.
      e.g.

      ...
      fact-groups : {
        my_custom_group : ["my_custom_fact", "os.name" ]
      }
      ...

      `blocklist` and `ttls` groups from `facter.conf` accept predefined groups, custom groups or fact names (in the case of external facts, the file name should be used)
      Show
      Users can define their own custom groups in `facter.conf` using the new `fact-groups` group. e.g. ... fact-groups : {   my_custom_group : ["my_custom_fact", "os.name" ] } ... `blocklist` and `ttls` groups from `facter.conf` accept predefined groups, custom groups or fact names (in the case of external facts, the file name should be used)
    • Needs Assessment

    Description

      In the first round of Configurable Facter work, we added the ability to cache and block built-in facts via settings in the config file. There is also demand to be able to cache and block custom Ruby facts. Blocking should be straightforward, but to implement caching, some updates to the methods dealing with the fact cache are needed, since they currently assume resolvers are the source of all the fact data.

      In order to keep the feel similar to resolvers, and in response to customer feedback, custom facts should specify a cache group in the form of a sort of tag in the fact, which can be used to cache or block any custom fact with that tag.

      In addition, the output of the list-block-groups and list-cache-groups command line options need to be updated to also report custom facts available for caching and blocking.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              oana.tanasoiu Oana Tanasoiu
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support