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

Facter 4.0.x on Windows does not return the domain when set in the registry

    XMLWordPrintable

Details

    • Night's Watch
    • 2
    • ghost-9.12, ghost-18.12, ghost-13.01.2020
    • Needs Assessment
    • Bug Fix
    • Hide
      Description of the problem: Domain is not retrieve correctly on Linux based systems and results in a faulty fqdn fact. Also Facter fails to retrieve domain fact when Windows does not expose the host's primary DNS suffix via WMI and it's only present in the registry.

      Description of the fix: Use Ruby Socket's methods to retrieve domain correctly for Linux systems. For Windows, try to retrieve domain from registry if the domain wasn't retrieved with GetAdaptersAddresses call. Also fixed the trailing dot problem with fqdn fact when the domain is missing.
      Show
      Description of the problem: Domain is not retrieve correctly on Linux based systems and results in a faulty fqdn fact. Also Facter fails to retrieve domain fact when Windows does not expose the host's primary DNS suffix via WMI and it's only present in the registry. Description of the fix: Use Ruby Socket's methods to retrieve domain correctly for Linux systems. For Windows, try to retrieve domain from registry if the domain wasn't retrieved with GetAdaptersAddresses call. Also fixed the trailing dot problem with fqdn fact when the domain is missing.
    • Needs Assessment

    Description

      The gem-based facter 4.0.x does not return the correct fqdn – it returns the hostname with dot instead of returning hostname with the domain suffix.

      Example:
      facter fqdn
      Output:

      myhostname.

      The correct output:
      myhostname.mydomain.com

      This breaks scripts which issue http request to the fqdn (like: http://myhostname.:1234 is not reachable).

      Attachments

        Issue Links

          Activity

            People

              oana.tanasoiu Oana Tanasoiu
              sstripathi Sanjay Tripathi
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support