Fix removing left-over addresses if keepalived aborts
Issue #718 reported that if keepalived terminates abnormally when
it has vrrp instances in master state, it doesn't remove the
left-over VIPs and eVIPs when it restarts. This is despite
commit f4c10426c saying that it resolved this problem.
It turns out that commit f4c10426c did resolve the problem for VIPs
or eVIPs, although it did resolve the issue for iptables and ipset
configuration.
This commit now really resolves the problem, and residual VIPs and
eVIPs are removed at startup.
commit f4c10426ca0a7c3392422c22079f1b71e7d4ebe9
Author: Quentin Armitage <email address hidden>
Date: Sun Mar 6 09:53:27 2016 +0000
Remove ip addresses left over from previous failure
If keepalived terminates unexpectedly, for any instances for which
it was master, it leaves ip addresses configured on the interfaces.
When keepalived restarts, if it starts in backup mode, the addresses
must be removed. In addition, any iptables/ipsets entries added for
!accept_mode must also be removed, in order to avoid multiple entries
being created in iptables.
This commit removes any addresses and iptables/ipsets configuration
for any interfaces that exist when iptables starts up. If keepalived
shut down cleanly, that will only be for non-vmac interfaces, but if
it terminated unexpectedly, it can also be for any left-over vmacs.
f4c10426ca0a7c3392422c22079f1b71e7d4ebe9 is not included in:
* keepalived 1:1.2.19-1ubuntu0.2 (xenial/mitaka)
The backport of f4c10426ca0a7c3392422c22079f1b71e7d4ebe9 to xenial does not look trivial. I'd prefer to backport keepalived 1:1.3.2-* to the pike/ocata cloud archives.
It appears the following commits are required to fix this for keepalived:
commit e90a633c34fbe6e bbb891aa98bf29c e579b8b45c
Author: Quentin Armitage <email address hidden>
Date: Fri Dec 15 21:14:24 2017 +0000
Fix removing left-over addresses if keepalived aborts
Issue #718 reported that if keepalived terminates abnormally when
it has vrrp instances in master state, it doesn't remove the
left-over VIPs and eVIPs when it restarts. This is despite
commit f4c10426c saying that it resolved this problem.
It turns out that commit f4c10426c did resolve the problem for VIPs
or eVIPs, although it did resolve the issue for iptables and ipset
configuration.
This commit now really resolves the problem, and residual VIPs and
eVIPs are removed at startup.
Signed-off-by: Quentin Armitage <email address hidden>
commit f4c10426ca0a7c3 392422c22079f1b 71e7d4ebe9
Author: Quentin Armitage <email address hidden>
Date: Sun Mar 6 09:53:27 2016 +0000
Remove ip addresses left over from previous failure
If keepalived terminates unexpectedly, for any instances for which
it was master, it leaves ip addresses configured on the interfaces.
When keepalived restarts, if it starts in backup mode, the addresses
must be removed. In addition, any iptables/ipsets entries added for
!accept_mode must also be removed, in order to avoid multiple entries
being created in iptables.
This commit removes any addresses and iptables/ipsets configuration
for any interfaces that exist when iptables starts up. If keepalived
shut down cleanly, that will only be for non-vmac interfaces, but if
it terminated unexpectedly, it can also be for any left-over vmacs.
Signed-off-by: Quentin Armitage <email address hidden>
f4c10426ca0a7c3 392422c22079f1b 71e7d4ebe9 is already included in:
* keepalived 1:1.3.9-1build1 (bionic/queens, cosmic/rocky)
* keepalived 1:1.3.2-1build1 (artful/pike)
* keepalived 1:1.3.2-1 (zesty/ocata) [1]
[1] zesty is EOL - https:/ /launchpad. net/ubuntu/ +source/ keepalived/ 1:1.3.2- 1
f4c10426ca0a7c3 392422c22079f1b 71e7d4ebe9 is not included in:
* keepalived 1:1.2.19-1ubuntu0.2 (xenial/mitaka)
The backport of f4c10426ca0a7c3 392422c22079f1b 71e7d4ebe9 to xenial does not look trivial. I'd prefer to backport keepalived 1:1.3.2-* to the pike/ocata cloud archives.