Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
-
None
-
Night's Watch
-
3
-
NW - 2020-07-08, NW - 2020-07-21, NW - 2020-08-06, NW - 2020-08-18
-
Customer Feedback
-
Reviewed
-
39561
-
1
-
Bug Fix
-
-
Needs Assessment
Description
Puppet lookup CLI loads external Facts on the initiating node, which causes problems as the execution time of these facts is an unknown and limitless variable, which is harmful in needlessly increasing the round trip time of a hiera lookup, which is unfavorable in an automation environment
Reproduction,
In an environment where external facts are plugin synced to the local machine, run a puppet lookup with the --debug flag turned on.
puppet lookup --node doesntexist foo --debug
This will show the fact resolution on the local machine
$ puppet lookup --node doesntexist foo --debug ... Debug: Facter: resolving facts from executable file "/opt/puppetlabs/facter/facts.d/slow.rb".
|
Debug: Facter: executing command: /opt/puppetlabs/facter/facts.d/slow.rb
|
Debug: Facter: slow=true
|
Debug: Facter: SLOW FACT
|
Debug: Facter: process exited with status code 0.
|
Debug: Facter: fact "slow" has resolved to "true".
|
Warning: Facter: external fact file "/opt/puppetlabs/facter/facts.d/slow.rb" had output on stderr: SLOW FACT
|
details:
it seems the external fact resolution may have been explicitly added in https://github.com/puppetlabs/facter/blob/bebd6ce74cb735a6393691f0c445b328b59a0a44/lib/src/ruby/ruby.cc#L24 for https://tickets.puppetlabs.com/browse/FACT-1277