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

Debug output shows facter gets called thousands of times

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Normal
    • Resolution: Done
    • FACT 4.0.51
    • FACT 4.2.3
    • Facter 4
    • Puppet Agent 7.4.1 agent run on Windows with --debug enabled:

    • Hide

      Don't call facter repeatedly for things we already know.

      Show
      Don't call facter repeatedly for things we already know.
    • Night's Watch
    • 2
    • NW - 2021-07-28
    • 47112
    • 1
    • Enhancement
    • Reduces the number of redundant logs emitted by Facter
    • Needs Assessment

    Description

      When running a puppet agent run with --debug, the following block appears a whole lot in the output:

      2021-03-29 03:38:48 -0700 Facter (debug): Loading internal facts
      2021-03-29 03:38:48 -0700 Facter (debug): Loading all internal facts
      2021-03-29 03:38:48 -0700 Facter (debug): Loading external facts
      2021-03-29 03:38:48 -0700 Facter (debug): Loading custom facts
      2021-03-29 03:38:48 -0700 Facter (debug): Loading external facts
      2021-03-29 03:38:48 -0700 Facter (debug): User query is: ["operatingsystem"]
      2021-03-29 03:38:48 -0700 Facter (debug): Query is operatingsystem
      2021-03-29 03:38:48 -0700 Facter (debug): Checking query tokens operatingsystem
      2021-03-29 03:38:48 -0700 Facter (debug): List of resolvable facts: [#<Facter::SearchedFact:0x000000000a269198 @name="operatingsystem", @fact_class=Facts::Windows::Os::Name, @filter_tokens=[], @user_query="operatingsystem", @type=:legacy, @file=nil>]
      2021-03-29 03:38:48 -0700 Facter (debug): Resolving facts sequentially
      2021-03-29 03:38:48 -0700 Facter (debug): fact "operatingsystem" has resolved to: windows
      

      In my run this was in the logs 3054 times. Mostly it's for the operatingsystem and fqdn fact, but also a few others. It would seem that this is resource inefficient and could be improved.

      Attachments

        Issue Links

          Activity

            People

              gheorghe.popescu Gheorghe Popescu
              kevin.reeuwijk Kevin Reeuwijk
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support