Keepalived Loses VIP on DHCP Renewal
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
keepalived (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Ubuntu Release: 16.04.6 LTS
Keepalived Package Version: 1.2.24-
-- /etc/keepalived
vrrp_script chk_apiserver {
script "curl https:/
interval 10
fall 6
rise 2
}
vrrp_instance K8S_APISERVER {
interface ens3
state BACKUP
virtual_
nopreempt
dont_
authentication {
auth_type AH
auth_pass **REDACTED**
}
virtual_
}
track_script {
}
}
Expected Behavior: Upon DHCP renewal, Keepalived would maintain its VIP on the designated interface. In the case that the VIP is lost (outside of its control), it should failover to another VRRP instance.
Actual Behavior: VIP disappeared from the designated interface, and did not failover to any other VRRP instance until Keepalived was restarted.
2: ens3: <BROADCAST,
link/ether fa:16:3e:8c:d2:e1 brd ff:ff:ff:ff:ff:ff
inet 172.20.34.50/27 brd 172.20.34.63 scope global ens3
valid_lft forever preferred_lft forever
inet6 fe80::f816:
valid_lft forever preferred_lft forever
-- /var/log/syslog --
Feb 5 21:13:17 dhclient[839]: DHCPDISCOVER on ens3 to 255.255.255.255 port 67 interval 3 (xid=0x4cfc595e)
Feb 5 21:13:17 dhclient[839]: DHCPREQUEST of 172.20.34.50 on ens3 to 255.255.255.255 port 67 (xid=0x5e59fc4c)
Feb 5 21:13:17 dhclient[839]: DHCPOFFER of 172.20.34.50 from 172.20.34.36
Feb 5 21:13:17 dhclient[839]: DHCPACK of 172.20.34.50 from 172.20.34.36
Feb 5 21:13:17 dhclient[839]: bound to 172.20.34.50 -- renewal in 40846 seconds.
Feb 5 21:13:19 ntpd[19295]: Deleting interface #34 ens3, 172.20.34.40#123, interface stats: received=0, sent=0, dropped=0, active_time=150821 secs
-- /tmp/keepalived
VRRP Instance: K8S_APISERVER
Advertisements:
Received: 10722
Sent: 153463
Became master: 1
Released master: 0
Packet Errors:
Length: 0
TTL: 0
Invalid Type: 0
Advertisement Interval: 0
Address List: 0
Authentication Errors:
Invalid Type: 0
Type Mismatch: 0
Failure: 15
Priority Zero:
Received: 0
Sent: 0
Note: the networking.service was *not* restarted during this timeframe; however, I have been able to reproduce the issue in that manner.
Additionally, I've not been able to reproduce this issue by hand, i.e. 'dhclient -v -r ens3'. It seemingly only occurs when the lease has expired; it is the only time in which we can observe ntpd detecting that the interface has disappeared (thus the 'Deleting interface' message) at least.
Note: this is not a duplicate of https:/ /bugs.launchpad .net/netplan/ +bug/1815101 considering that's only relevant for Ubuntu 18.04 (Bionic) and later, and this report is regarding Ubuntu 16.04.
The same change as outlined in https:/ /bugs.launchpad .net/netplan/ +bug/1815101/ comments/ 4 _may_ still be relevant to also address this manifestation of the issue, though.