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

Facter no longer shows proper eth0 IP when running keepalived

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Accepted
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: FACT 3.0.2
    • Fix Version/s: None
    • Component/s: None
    • Environment:

      Ubuntu 14.4 for both master and agent.

    • Template:
    • Team:
      Platform OS

      Description

      When running keepalived Facter no longer shows the statically configured IP address on eth0, it shows eth0 as having the floating Ip from keepalived.

      The example below, ifconfig shows that eth0 is numbered at 172.19.2.196 and "ip addr" shows the .196 IP as well as 172.19.2.200 (the floating IP configured in keepalived). Facter ONLY shows the keepalive IP of 172.19.2.200, this makes using templates to manage the keepalived configuration impossible (or at least very difficult) without manually setting the IP on each server as facter no longer shows the proper primary IP address in any of the included facts.

      Here is the example:

      # facter -p | egrep networking -A 30
      networking => {
        dhcp => "172.19.2.7",
        domain => "pulled",
        fqdn => "pulled",
        hostname => "pulled",
        interfaces => {
          eth0 => {
            dhcp => "172.19.2.7",
            ip => "172.19.2.200",
            mac => "pulled",
            mtu => 1500,
            netmask => "255.255.254.0",
            network => "172.19.2.0"
          },
          lo => {
            ip => "127.0.0.1",
            mtu => 65536,
            netmask => "255.0.0.0",
            network => "127.0.0.0"
          }
        },
        ip => "172.19.2.200",
        mac => "pulled",
        mtu => 1500,
        netmask => "255.255.254.0",
        network => "172.19.2.0"
      }
       
      # ifconfig
      eth0      Link encap:Ethernet  HWaddr pulled
                inet addr:172.19.2.196  Bcast:172.19.3.255  Mask:255.255.254.0
                UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
                RX packets:1794208066 errors:0 dropped:179085699 overruns:0 frame:0
                TX packets:959406063 errors:0 dropped:0 overruns:0 carrier:0
                collisions:0 txqueuelen:1000 
                RX bytes:1732931718243 (1.7 TB)  TX bytes:489002561928 (489.0 GB)
       
      lo        Link encap:Local Loopback  
                inet addr:127.0.0.1  Mask:255.0.0.0
                UP LOOPBACK RUNNING  MTU:65536  Metric:1
                RX packets:2600391 errors:0 dropped:0 overruns:0 frame:0
                TX packets:2600391 errors:0 dropped:0 overruns:0 carrier:0
                collisions:0 txqueuelen:0 
                RX bytes:148508510 (148.5 MB)  TX bytes:148508510 (148.5 MB)
       
       
      # ip addr
      1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN 
          link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
          inet 127.0.0.1/8 scope host lo
             valid_lft forever preferred_lft forever
      2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
          link/ether pulled brd ff:ff:ff:ff:ff:ff
          inet 172.19.2.196/23 brd 172.19.3.255 scope global eth0
             valid_lft forever preferred_lft forever
          inet 172.19.2.200/23 brd 172.19.3.255 scope global secondary eth0
             valid_lft forever preferred_lft forever
      
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            tim.purkerson Tim Purkerson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Zendesk Support