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

Facter throws noisy "No resolver for external facts file" warning on custom fact files

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • FACT 3.14.8
    • FACT 3.14.9
    • None
    • Night's Watch
    • 1
    • NW - 2020-03-04
    • Needs Assessment
    • 38956
    • 1
    • Bug Fix
    • Hide
       Log "No resolver for external facts file" as warning only for user
       specified external dirs, use debug otherwise
      Show
       Log "No resolver for external facts file" as warning only for user  specified external dirs, use debug otherwise
    • Needs Assessment

    Description

      Puppet Version: 6.13.0
      Puppet Server Version: 6.9.0
      OS Name/Version: RHEL7

      After upgrading to version 6.13.0 of puppet-agent (which includes facter 3.14.8) we have started seeing a "No resolver for external facts file {filename}" warning message for every file in our custom facts directory (/opt/puppetlabs/facter/facts.d), both when running puppet agent -t, as well as running facter directly.

      $ puppet agent -t
      Warning: Facter: skipping file "/opt/puppetlabs/facter/facts.d/customfact.rb": No resolver for external facts file /opt/puppetlabs/facter/facts.d/customfact.rb
      ...
      Info: Using configured environment 'development'
      Info: Retrieving pluginfacts
      Info: Retrieving plugin
      Info: Retrieving locales
      Info: Loading facts
      Warning: Facter: skipping file "/opt/puppetlabs/facter/facts.d/customfact.rb": No resolver for external facts file /opt/puppetlabs/facter/facts.d/customfact.rb
      ...
      Info: Caching catalog for myserver.my.domain
      Info: Applying configuration version '1582828949'
      

      $ facter hostname
      2020-02-27 13:56:50.591690 WARN  puppetlabs.facter - skipping file "/opt/puppetlabs/facter/facts.d/customfact.rb": No resolver for external facts file /opt/puppetlabs/facter/facts.d/customfact.rb
      myserver
      

       All files in our facts.d directory have .rb extensions and 644 permissions (non-executable)

      Further research indicates that this does not occur in puppet-agent 6.12.0 with facter 3.14.7, as the message at the time was a debug message "checking execution on {filename}"...

      It looks like the relevant change was made here.

      We can prevent facter from attempting to load external facts by setting no-external=true in facter.conf, but this does not have any impact on the output of our puppet runs (likely due to using the facter API?)

      Desired Behavior:

      I would prefer to revert to the previous behavior where our custom facts load successfully without the noisy warning messages. I would prefer not to adjust our verbosity to avoid missing real warnings.

      It seems to me that facter should only attempt to load the external facts if the files are executable?

      Actual Behavior:

      The warnings cause our puppet runs to be unnecessarily noisy.

      Attachments

        Issue Links

          Activity

            People

              ciprian.badescu Ciprian Badescu
              josterpt Jory Osterptak
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support