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

    • Template:
      New os support on traditional module
    • Team:
      Night's Watch
    • Sub-team:
    • Story Points:
      2
    • Sprint:
      ghost-9.12, ghost-18.12, ghost-13.01.2020
    • Method Found:
      Needs Assessment
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      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.
    • QA Risk Assessment:
      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

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

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support