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

Improve Solaris $::ipaddress accuracy

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Normal
    • Resolution: Cannot Reproduce
    • Affects Version/s: FACT 1.7.5, FACT 2.2.0
    • Fix Version/s: None
    • Component/s: None
    • Environment:

      Solaris 8/9/10 on SPARC, observed on numerous SPARC models

    • Template:
    • Team:
      Platform OS

      Description

      On Solaris, in the ifconfig output, NICS show up as <driver><instance> (eg bge0, bge1, hme0, etc). In facter, the $::ipaddress fact is derived from the NIC that is alphabetically first, but this is not always accurate. For example, interface ge0 has the IP of the hostname, but bge0 may be configured for a storage or cluster network and it will show up as $::ipaddress since 'bge' comes before 'ge', even though this is wrong.

      Here is a real-world example of mine, ipaddress_bge0 is on a non-routable admin network and ipaddress_nxge0 is the IP of the server in DNS:
      ipaddress => 192.168.1.17
      ipaddress_bge0 => 192.168.1.17
      ipaddress_lo0 => 127.0.0.1
      ipaddress_nxge0 => 10.19.1.3
      ipaddress_nxge1 => 10.19.1.4
      ipaddress_sppp0 => 192.168.224.3

      Can the behavior be changed on Solaris so $::ipaddress equals the IP that matches the hostname?

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            ryan.c.anderson@gmail.com Ryan Anderson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support