[Help!] KeepAlived does not set vip on Teaming interface which team driver (LACP) is used

Latest response

Hello

I am trying to configure keepalived on NIC teaming (team driver) . NIC teaming working in LACP mode.

http://rhelblog.redhat.com/2014/06/23/team-driver/

However , virtual ip is not created on team0 . KeepAlived is properly running with MASTER and BACKUP.
Does team interface support ?

My keepalived virtual instance is configured as below.

vrrp_instance SERVICE_1 {
state MASTER
interface team0
virtual_router_id 50
priority 101
advert_int 1
}
virtual_ipaddress {
10.213.140.49 dev team0
}
track_script {
check_service
}
}

ip addr command is below.

[sysadmin@BSU00383 ~]$ ip addr show team0
13: team0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
link/ether 3c:a8:2a:e8:85:d4 brd ff:ff:ff:ff:ff:ff
inet 10.213.140.50/24 brd 10.213.140.255 scope global team0
valid_lft forever preferred_lft forever

My platform is RHEL 7.3.

[sysadmin@BSU00383 ~]$ sudo cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.3 (Maipo)

KeepAlived version is below.
[sysadmin@BSU00383 ~]$ sudo rpm -qa | grep keepalived
keepalived-1.2.13-8.el7.x86_64

Any help is appreciated!

Responses

I was not able to reproduce this problem when team driver is in Round Robin mode. I have tested this on kvm.

2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master team0 state UP qlen 1000
    link/ether 52:54:00:df:a1:13 brd ff:ff:ff:ff:ff:ff
3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master team0 state UP qlen 1000
    link/ether 52:54:00:df:a1:13 brd ff:ff:ff:ff:ff:ff
4: team0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether 52:54:00:df:a1:13 brd ff:ff:ff:ff:ff:ff
    inet 192.168.11.21/24 brd 192.168.11.255 scope global team0
       valid_lft forever preferred_lft forever
    inet 192.168.11.250/24 scope global secondary team0
       valid_lft forever preferred_lft forever

I will next check in LACP mode.

According to the log, I see some logs are missing which I expect.

May  2 14:19:31 00383 systemd: Starting LVS and VRRP High Availability Monitor...
May  2 14:19:31 00383 Keepalived[4459]: Starting Keepalived v1.2.13 (07/01,2016)
May  2 14:19:31 00383 Keepalived[4460]: Starting Healthcheck child process, pid=4461
May  2 14:19:31 00383 Keepalived[4460]: Starting VRRP child process, pid=4462
May  2 14:19:31 00383 systemd: Started LVS and VRRP High Availability Monitor.
May  2 14:19:31 00383 Keepalived_healthcheckers[4461]: Netlink reflector reports IP 10.213.xxx.xx added
May  2 14:19:31 00383 Keepalived_healthcheckers[4461]: Netlink reflector reports IP 172.16.x.xx added
May  2 14:19:31 00383 Keepalived_vrrp[4462]: Netlink reflector reports IP 10.213.xxx.xx added
May  2 14:19:31 00383 Keepalived_vrrp[4462]: Netlink reflector reports IP 172.16.x.xx added
May  2 14:19:31 00383 Keepalived_healthcheckers[4461]: Registering Kernel netlink reflector
May  2 14:19:31 00383 Keepalived_healthcheckers[4461]: Registering Kernel netlink command channel
May  2 14:19:31 00383 Keepalived_vrrp[4462]: Registering Kernel netlink reflector
May  2 14:19:31 00383 Keepalived_vrrp[4462]: Registering Kernel netlink command channel
May  2 14:19:31 00383 Keepalived_vrrp[4462]: Registering gratuitous ARP shared channel
May  2 14:19:31 00383 Keepalived_healthcheckers[4461]: Opening file '/etc/keepalived/keepalived.conf'.
May  2 14:19:31 00383 Keepalived_vrrp[4462]: Opening file '/etc/keepalived/keepalived.conf'.
May  2 14:19:31 00383 Keepalived_vrrp[4462]: Configuration is using : 63246 Bytes
May  2 14:19:31 00383 Keepalived_vrrp[4462]: Using LinkWatch kernel netlink reflector...
May  2 14:19:31 00383 Keepalived_vrrp[4462]: VRRP sockpool: [ifindex(21), proto(112), unicast(0), fd(10,11)]
May  2 14:19:31 00383 Keepalived_healthcheckers[4461]: Configuration is using : 8810 Bytes
May  2 14:19:31 00383 Keepalived_healthcheckers[4461]: Using LinkWatch kernel netlink reflector...
May  2 14:19:32 00383 Keepalived_vrrp[4462]: VRRP_Instance(SERVICE_1) Transition to MASTER STATE
May  2 14:19:33 00383 Keepalived_vrrp[4462]: VRRP_Instance(SERVICE_1) Entering MASTER STATE

I do not see below logs which I usually do.

May  2 06:56:32 localhost kernel: nf_conntrack version 0.5.0 (16384 buckets, 65536 max)
May  2 06:56:32 localhost kernel: IPVS: Registered protocols (TCP, UDP, SCTP, AH, ESP)
May  2 06:56:32 localhost kernel: IPVS: Connection hash table configured (size=4096, memory=64Kbytes)
May  2 06:56:32 localhost kernel: IPVS: Creating netns size=2040 id=0
May  2 06:56:32 localhost kernel: IPVS: ipvs loaded.
May  2 06:56:34 localhost Keepalived_vrrp[7088]: VRRP_Instance(RH_1) setting protocol VIPs.
May  2 06:56:34 localhost Keepalived_vrrp[7088]: VRRP_Instance(RH_1) Sending gratuitous ARPs on team0 for 192.168.11.250

Both ip_vs and nf_conntrack is loaded by kernel.

[sysadmin@xxx] sudo modinfo ip_vs
filename:       /lib/modules/3.10.0-514.16.1.el7.x86_64/kernel/net/netfilter/ipvs/ip_vs.ko
license:        GPL
rhelversion:    7.3
srcversion:     DCEE1A9F152ED56E5E6EF3C
depends:        nf_conntrack,libcrc32c
intree:         Y
vermagic:       3.10.0-514.16.1.el7.x86_64 SMP mod_unload modversions
signer:         Red Hat Enterprise Linux kernel signing key
sig_key:        5B:D4:0F:FE:7C:98:FB:5A:A4:74:2A:24:20:C5:1C:CE:DC:26:E1:6D
sig_hashalgo:   sha256
parm:           conn_tab_bits:Set connections' hash size (int)
[sysadmin@xxx] sudo modinfo nf_conntrack
filename:       /lib/modules/3.10.0-514.16.1.el7.x86_64/kernel/net/netfilter/nf_conntrack.ko
license:        GPL
rhelversion:    7.3
srcversion:     F23448AFA9FE7FC004739DA
depends:
intree:         Y
vermagic:       3.10.0-514.16.1.el7.x86_64 SMP mod_unload modversions
signer:         Red Hat Enterprise Linux kernel signing key
sig_key:        5B:D4:0F:FE:7C:98:FB:5A:A4:74:2A:24:20:C5:1C:CE:DC:26:E1:6D
sig_hashalgo:   sha256
parm:           tstamp:Enable connection tracking flow timestamping. (bool)
parm:           acct:Enable connection tracking flow accounting. (bool)
parm:           nf_conntrack_helper:Enable automatic conntrack helper assignment (default 1) (bool)
parm:           expect_hashsize:uint

Hardware I am using HP Proliant Apollo 4200.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.