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

Facter ipaddress6 on Windows returns link-local address with interface identifier

    XMLWordPrintable

Details

    • Night's Watch
    • 2
    • NW - 2019-08-07, NW - 2019-08-21
    • Needs Assessment
    • Bug Fix
    • Hide
      Prior to this fix, when "facter ipaddress6" was run on windows servers,
      it returned the ipv6 and the interface identifier.
      This was caused by a windows function that retrieves ipaddress6 together with the interface identifier.

      Now it correctly returns only the ipaddress6 without the interface id.
      This fix was also applied to network6 fact as it also returned network6 together with the interface identifier.
      Show
      Prior to this fix, when "facter ipaddress6" was run on windows servers, it returned the ipv6 and the interface identifier. This was caused by a windows function that retrieves ipaddress6 together with the interface identifier. Now it correctly returns only the ipaddress6 without the interface id. This fix was also applied to network6 fact as it also returned network6 together with the interface identifier.
    • Needs Assessment

    Description

      When run on Windows servers "facter ipaddress6" returns the ipv6 address including the interface identifier.

      This causes issues with Ruby applications importing Puppet Facts as Ruby IPAddr cannot deal with IPv6 addresses that include the interface identifier.

      When run on Linux servers "facter ipaddress6" does not return the ipv6 address including the interface identifier.

       

      Examples:

      Windows Server 2012R2

      Facter 3.11.6

      PS C:\Users\user> facter ipaddress6
      fe80::xxxx:xxx:xxxx:bbe%13

       

      CentOS  7.5.1804

      Facter 3.11.8

      [root@hostname ~]# facter ipaddress6
      fe80::xxx:xxxx:xxxx:d4bc

       

      /var/log/foreman/production.log

      2019-07-09T14:59:12 [W|app|47240] Action failed IPAddr::InvalidAddressError: invalid address /opt/rh/rh-ruby25/root/usr/share/ruby/ipaddr.rb:649:in `in6_addr' /opt/rh/rh-ruby25/root/usr/share/ruby/ipaddr.rb:586:in `initialize' /usr/share/foreman/app/models/subnet.rb:295:in `new' /usr/share/foreman/app/models/subnet.rb:295:in `subnet_for' /usr/share/foreman/app/models/host/base.rb:466:in `set_interface' /usr/share/foreman/app/models/host/base.rb:208:in `block in set_interfaces' /usr/share/foreman/app/models/host/base.rb:205:in `each' /usr/share/foreman/app/models/host/base.rb:205:in `set_interfaces' /usr/share/foreman/app/models/host/base.rb:183:in `populate_fields_from_facts' /usr/share/foreman/app/models/host/managed.rb:410:in `populate_fields_from_facts' /usr/share/foreman/app/models/concerns/puppet_host_extensions.rb:3:in `populate_fields_from_facts' /usr/share/foreman/app/models/host/base.rb:161:in `block in parse_facts' /usr/share/foreman/app/services/foreman/telemetry_helper.rb:27:in `telemetry_duration_histogram' /usr/share/foreman/app/models/host/base.rb:160:in `parse_facts' /usr/share/foreman/app/models/host/base.rb:149:in `import_facts'

      Further discussion of this can be found at the following:

      https://bugs.ruby-lang.org/issues/8464

      https://community.theforeman.org/t/rails-logs-filling-production-log/14519

      Attachments

        Activity

          People

            dorin.pleava Dorin Pleava
            synaptik Simon Thomson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support