Daily cron restarts network on unattended updates but keepalived .service is not restarted as a dependency
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
keepalived (Ubuntu) |
Triaged
|
High
|
Karl Stenerud | ||
networkd-dispatcher (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
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_
state MASTER
interface ens3
virtual_
$(ip addr | grep 'inet ' | grep global | head -1 | sed 's/.*inet \([0-9]
}
}" >/etc/keepalive
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-
(From unanswered https:/
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/
--- keepalived.
+++ keepalived.service 2018-11-20 09:05:55.984773226 +0100
@@ -4,6 +4,7 @@
Wants=
# Only start if there is a configuration file
ConditionFileN
+PartOf=
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..
tags: | added: rls-dd-incoming |
Changed in networkd-dispatcher (Ubuntu): | |
status: | Confirmed → Opinion |
status: | Opinion → Invalid |
tags: | added: server-triage-discuss |
Changed in keepalived (Ubuntu): | |
status: | Confirmed → Triaged |
importance: | Undecided → High |
tags: | removed: server-triage-discuss |
Changed in keepalived (Ubuntu): | |
assignee: | nobody → Karl Stenerud (kstenerud) |
description: | updated |
description: | updated |
Hi Tom, thanks for bringing up this issue!
As this package needs to work with both server and desktop editions, I'm not sure how this would work with networkmanager...
Would you be able to put together a simple VM test case that demonstrates the issue and fix, and ensures things still work as a whole?