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

'puppet facts show' logs error when stdlib is installed

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • None
    • FACT 4.0.52
    • None
    • Night's Watch
    • 5
    • NW - 2021-03-03
    • Needs Assessment
    • Bug Fix
    • Fixed a bug where `Facter.value` was not always returning the fact value for a legacy fact. This was observed when calling a legacy fact from a custom fact or calling other Facter API methods before calling value.
    • Needs Assessment

    Description

      When running `puppet facts show` and puppetlabs-stdlib is installed, the following error message is shown:

      Error: Could not autoload puppet/provider/service/init: undefined method `downcase' for nil:NilClass
      Error: Could not autoload puppet/provider/service/bsd: Could not autoload puppet/provider/service/init: undefined method `downcase' for nil:NilClass
      Error: Facter: error while resolving custom facts in /etc/puppetlabs/code/modules/stdlib/lib/facter/service_provider.rb Could not autoload puppet/provider/service/bsd: Could not autoload puppet/provider/service/init: undefined method `downcase' for nil:NilClass
      

      This happens because `Facter::Options` is globally set for the entire run.

      Note that the command is working, and running "puppet facts show fact" does not log any error

      Attachments

        Issue Links

          Activity

            People

              gheorghe.popescu Gheorghe Popescu
              gheorghe.popescu Gheorghe Popescu
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support