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

'puppet facts show' logs error when stdlib is installed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: FACT 4.0.52
    • Component/s: None
    • Template:
    • Team:
      Night's Watch
    • Story Points:
      5
    • Sprint:
      NW - 2021-03-03
    • Method Found:
      Needs Assessment
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      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.
    • QA Risk Assessment:
      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

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

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support