[Bug 1810583] Re: Daily cron restarts network on unattended updates but keepalived .service is not restarted as a dependency
Rafael David Tinoco
rafaeldtinoco at kernelpath.com
Fri Sep 13 14:44:51 UTC 2019
*** This bug is a duplicate of bug 1815101 ***
https://bugs.launchpad.net/bugs/1815101
The following 3 bugs:
https://bugs.launchpad.net/bugs/1815101
https://bugs.launchpad.net/bugs/1819074
https://bugs.launchpad.net/bugs/1810583
Have the same root cause: the fact that systemd-network messes with
secondary IP addresses in NICs managed by systemd.
I'm marking all other cases as a duplicate of LP: #1815101.
TODO here is the following:
- There are mainly 2 "fixes" for this issue:
1) keepalived is able to recognize systemd-networkd changes and change
cluster status in order to reconfigure managed NICs (keepalived (>
2.0.x)).
2) systemd-networkd implements a new stanza (KeepConfiguration=) to
systemd service unit files in order to fix not only this behavior but
all those HA related software that manages secondary IPs and/or aliases
to NICs being managed by systemd-networkd.
I think the most appropriate would make sure those 2 features work in
Eoan, both, together, and then make sure the SRUs are done to Disco and
Bionic. One problem w/ the item (2) is that netplan will also have to
support the new "KeepConfiguration=" systemd service file stanza, but,
the fix (2) is more appropriate for all other HA related softwares
controlling virtual IPs (CTDB, Pacemaker, and so ...).
** This bug has been marked a duplicate of bug 1815101
[master] Restarting systemd-networkd breaks keepalived clusters
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to networkd-dispatcher in Ubuntu.
https://bugs.launchpad.net/bugs/1810583
Title:
Daily cron restarts network on unattended updates but keepalived
.service is not restarted as a dependency
Status in keepalived package in Ubuntu:
Triaged
Status in networkd-dispatcher package in Ubuntu:
Invalid
Bug description:
[Impact]
If systemd-networkd is restarted, any VRRP from keepalived are not
restored.
[Test Case]
multipass launch daily:bionic --name tester && multipass exec tester
-- sudo su
apt update && apt dist-upgrade -y && apt install -y keepalived &&
echo "vrrp_instance VI_1 {
virtual_router_id 33
state MASTER
interface ens3
virtual_ipaddress {
$(ip addr | grep 'inet ' | grep global | head -1 | sed 's/.*inet \([0-9]*\.[0-9]*\.[0-9]*\)\..*/\1.3/g')
}
}" >/etc/keepalived/keepalived.conf &&
service keepalived start &&
# There will be a new IP address x.x.x.3/32 added to ens3
ip addr
# Restart networkd. The IP address won't come back
systemctl restart systemd-networkd
ip addr
# Restart keepalived. The IP address will come back
systemctl restart keepalived
ip addr
[Regression Potential]
TODO
[Original Description]
Description: Ubuntu 18.04.1 LTS
Release: 18.04
ii keepalived 1:1.3.9-1ubuntu0.18.04.1 amd64 Failover and monitoring daemon for LVS clusters
(From unanswered
https://answers.launchpad.net/ubuntu/+source/keepalived/+question/676267)
Since two weeks we lost our keepalived VRRP address on on our of
systems, closer inspection reveals that this was due to the daily
cronjob.Apparently something triggered a udev reload (and last week
the same seemed to happen) which obviously triggers a network restart.
Are we right in assuming the below patch is the correct way (and
shouldn't this be in the default install of the systemd service of
keepalived).
/etc/systemd/system/multi-user.target.wants/keepalived.service:
--- keepalived.service.orig 2018-11-20 09:17:06.973924706 +0100
+++ keepalived.service 2018-11-20 09:05:55.984773226 +0100
@@ -4,6 +4,7 @@
Wants=network-online.target
# Only start if there is a configuration file
ConditionFileNotEmpty=/etc/keepalived/keepalived.conf
+PartOf=systemd-networkd.service
Accompanying syslog:
Nov 20 06:34:33 ourmachine systemd[1]: Starting Daily apt upgrade and clean activities...
Nov 20 06:34:42 ourmachine systemd[1]: Reloading.
Nov 20 06:34:44 ourmachine systemd[1]: message repeated 2 times: [ Reloading.]
Nov 20 06:34:44 ourmachine systemd[1]: Starting Daily apt download activities...
Nov 20 06:34:44 ourmachine systemd[1]: Stopping udev Kernel Device Manager...
Nov 20 06:34:44 ourmachine systemd[1]: Stopped udev Kernel Device Manager.
Nov 20 06:34:44 ourmachine systemd[1]: Starting udev Kernel Device Manager...
Nov 20 06:34:44 ourmachine systemd[1]: Started udev Kernel Device Manager.
Nov 20 06:34:45 ourmachine systemd[1]: Reloading.
Nov 20 06:34:45 ourmachine systemd[1]: Reloading.
Nov 20 06:35:13 ourmachine systemd[1]: Reexecuting.
Nov 20 06:35:13 ourmachine systemd[1]: Stopped Wait for Network to be Configured.
Nov 20 06:35:13 ourmachine systemd[1]: Stopping Wait for Network to be Configured...
Nov 20 06:35:13 ourmachine systemd[1]: Stopping Network Service..
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/keepalived/+bug/1810583/+subscriptions
More information about the foundations-bugs
mailing list