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

Root of structured core facts cannot be overriden by a custom fact

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • None
    • FACT 4.0.52
    • None
    • Night's Watch
    • 3
    • NW - 2021-03-17
    • Needs Assessment
    • Bug Fix
    • Hide
      Because the top-level fact does not exist, the root of structured core facts could not be overridden by a custom fact. This change updates the QueryParser logic to return the root fact, if that present in the loaded facts list, thus allowing completely redefinition of core facts.
      Show
      Because the top-level fact does not exist, the root of structured core facts could not be overridden by a custom fact. This change updates the QueryParser logic to return the root fact, if that present in the loaded facts list, thus allowing completely redefinition of core facts.
    • Needs Assessment

    Description

      Facter represents structured facts as a list of paths e.g.

      os => {
        architecture => "x86_64",
        family => "Darwin",
        ...
        release => {
          full => "20.3.0",
          major => "20",
          minor => "3"
        }
      }
      

      will be represented as

      os.architecture
      os.family
      os.release.full
      os.release.major
      os.release.minor
      

      "os" is never represented as a fact name.

      When we create a custom fact "os", we don't override the list of facts, we just create a new fact and add it to that list

      os
      os.architecture
      os.family
      os.release.full
      os.release.major
      os.release.minor
      

      Attachments

        Activity

          People

            gheorghe.popescu Gheorghe Popescu
            bogdan.irimie Bogdan Irimie
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support