Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
-
None
-
Puppet 7.11 on CentOS 7
-
Night's Watch
-
5
-
NW - 2021-11-17, NW - 2021-12-06
-
Needs Assessment
-
Bug Fix
-
-
Needs Assessment
Description
I have configured facter to cache and block several core and custom facts (puppet 7.11) and I am finding that the behaviour is odd. The example that I have attached here is from the puppetlabs-yum module that declares 3 custom facts:
- yum_package_updates (This is the primary fact that does all the work)
- yum_has_updates (returns the value of yum_package_updates.any?)
- yum_updates (returns the value of yum_package_updates.length)
My facter.conf file (attached) declares a yum group that contains these 3 facts but when I run puppet only the yum_package_updates fact is cached (cache file attached).
This seems to cause the other two dependent facts (yum_has_updates and yum_updates) to force the resolution (not from cache) of the main yum_package_updates fact.
I can also see in the debug logs that it seems to use the cache sometimes but then lose the cached value and resolve it again. It also states that the cache file is expired, missing or corrupt but the file is fresh, created by facter itself and the ttl is 6 hours.
If I specify all 3 facts in the cache individually (not in a group) the caching behaviour seems to work properly.