Adding and deleting a veth leaks a systemd unit
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
When I add a veth device:
sudo ip link add name test1 type veth
I see these systemd units appear:
systemctl list-units --all | grep test
sys-
loaded active plugged /sys/devices/
sys-
loaded active plugged /sys/subsystem/
However, if I then delete the veth:
sudo ip link del dev test1
Then only one of the units is removed:
systemctl list-units --all | grep test
sys-
loaded active plugged /sys/devices/
This is a big problem when running, for example, a Kubernetes cluster since each pod creation/deletion leaks a systemd unit. When enough have been leaked, systemd becomes unresponsive and the system is broken until reboot.
ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: systemd 234-2ubuntu12.1
ProcVersionSign
Uname: Linux 4.13.0-21-generic x86_64
ApportVersion: 2.20.7-0ubuntu3.6
Architecture: amd64
Date: Tue Jan 9 18:57:34 2018
Lsusb: Error: command ['lsusb'] failed with exit code 1:
MachineType: Google Google Compute Engine
ProcKernelCmdLine: BOOT_IMAGE=
SourcePackage: systemd
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 01/01/2011
dmi.bios.vendor: Google
dmi.bios.version: Google
dmi.board.
dmi.board.name: Google Compute Engine
dmi.board.vendor: Google
dmi.chassis.type: 1
dmi.chassis.vendor: Google
dmi.modalias: dmi:bvnGoogle:
dmi.product.name: Google Compute Engine
dmi.sys.vendor: Google
As a workaround, running
systemctl daemon-reload
removes all the leaked units.