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

Facter ruby API/binding fails to resolve facts from environment variables

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • FACT 4.2.2
    • FACT 4.2.4
    • None
    • Night's Watch
    • 2
    • NW - 2021-08-25
    • Needs Assessment
    • Bug Fix
    • Fix an issue where environment facts were not downcased before being added to the fact collection. This modification also documents that fact names are always downcased internally and are case-insensitive.
    • Needs Assessment

    Description

      Hello,

      during regular upgrade of our puppet ecosystem, we upgraded facter from 4.0.51 version to 4.2.2 version and hit issue, that ruby API/bindings fails to resolve facts from environment variables.

      Reproducer:

      # cat fact.rb
      require 'facter'
       
      puts(Facter.value(:myfact))
      

      # export FACTER_MYFACT=barani
      # ruby fact.rb
      

      With facter 4.0.51, fact.rb script returns the fact, with facter 4.2.2 it fails to return the fact.

      Attachments

        Issue Links

          Activity

            People

              gabriel.nagy Gabriel Nagy
              vonsch Adam Tkac
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support