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

facter4 doesn't resolve hostname facts

    XMLWordPrintable

    Details

    • Template:
    • Team:
      Night's Watch
    • Sub-team:
    • Sprint:
      ghost-9.12
    • Method Found:
      Needs Assessment
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hide
      Description of the problem: Facter fails when Socket.getaddrinfo is called and it prevents fqdn information to be retrieved.
      Description of the fix: Rescue StandardError and continue resolving fqdn.
      Show
      Description of the problem: Facter fails when Socket.getaddrinfo is called and it prevents fqdn information to be retrieved. Description of the fix: Rescue StandardError and continue resolving fqdn.
    • QA Risk Assessment:
      Needs Assessment

      Description

      Using latest facter#main, hostname related facts fail to resolve:

      $  git rev-parse HEAD
      e09fd2737d4b1e7ecd90ae0fdeddc5a0911906dc
      $ bundle exec facter fqdn domain hostname --trace
      [2020-12-08 12:57:50.284581 ] ERROR Facter::InternalFactManager - getaddrinfo: nodename nor servname provided, or not known
      /Users/josh/work/facter/lib/facter/resolvers/hostname_resolver.rb:45:in `getaddrinfo'
      /Users/josh/work/facter/lib/facter/resolvers/hostname_resolver.rb:45:in `retrieve_with_addrinfo'
      /Users/josh/work/facter/lib/facter/resolvers/hostname_resolver.rb:24:in `retrieve_info'
      /Users/josh/work/facter/lib/facter/resolvers/hostname_resolver.rb:16:in `block in post_resolve'
      /Users/josh/work/facter/lib/facter/resolvers/hostname_resolver.rb:16:in `fetch'
      /Users/josh/work/facter/lib/facter/resolvers/hostname_resolver.rb:16:in `post_resolve'
      /Users/josh/work/facter/lib/facter/resolvers/base_resolver.rb:26:in `block in resolve'
      /Users/josh/work/facter/lib/facter/resolvers/base_resolver.rb:24:in `synchronize'
      /Users/josh/work/facter/lib/facter/resolvers/base_resolver.rb:24:in `resolve'
      /Users/josh/work/facter/lib/facter/facts/macosx/networking/fqdn.rb:11:in `call_the_resolver'
      /Users/josh/work/facter/lib/facter/framework/core/fact/internal/core_fact.rb:16:in `block in create'
      /Users/josh/work/facter/lib/facter/framework/benchmarking/timer.rb:18:in `measure'
      /Users/josh/work/facter/lib/facter/framework/core/fact/internal/core_fact.rb:15:in `create'
      /Users/josh/work/facter/lib/facter/framework/core/fact/internal/internal_fact_manager.rb:79:in `resolve_fact'
      /Users/josh/work/facter/lib/facter/framework/core/fact/internal/internal_fact_manager.rb:64:in `block (2 levels) in start_threads'
      

        Attachments

          Activity

            People

            Assignee:
            oana.tanasoiu Oana Tanasoiu
            Reporter:
            josh Josh Cooper
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support