Adding and deleting a veth leaks a systemd unit

Bug #1742250 reported by Shaun Crampton
6
This bug affects 1 person
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-devices-virtual-net-test1.device
             loaded active plugged /sys/devices/virtual/net/test1

     sys-subsystem-net-devices-test1.device
             loaded active plugged /sys/subsystem/net/devices/test1

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-devices-virtual-net-test1.device
             loaded active plugged /sys/devices/virtual/net/test1

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
ProcVersionSignature: Ubuntu 4.13.0-21.24-generic 4.13.13
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=/boot/vmlinuz-4.13.0-21-generic root=UUID=c66b8cf4-2a6c-4fb3-9f39-59483a6a025c ro scsi_mod.use_blk_mq=Y console=ttyS0
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.asset.tag: 1AF4A7E8-D62B-D331-0693-3511A041DD96
dmi.board.name: Google Compute Engine
dmi.board.vendor: Google
dmi.chassis.type: 1
dmi.chassis.vendor: Google
dmi.modalias: dmi:bvnGoogle:bvrGoogle:bd01/01/2011:svnGoogle:pnGoogleComputeEngine:pvr:rvnGoogle:rnGoogleComputeEngine:rvr:cvnGoogle:ct1:cvr:
dmi.product.name: Google Compute Engine
dmi.sys.vendor: Google

Revision history for this message
Shaun Crampton (fasaxc) wrote :
description: updated
Revision history for this message
Shaun Crampton (fasaxc) wrote :

As a workaround, running

    systemctl daemon-reload

removes all the leaked units.

Revision history for this message
Shaun Crampton (fasaxc) wrote :

I tried this on Ubuntu 16.04, started on GCE and it didn't seem to repro there. When I add a veth, systemd units are added but they all seem to be cleaned up when the veth is removed.

Revision history for this message
Dan Streetman (ddstreet) wrote :

please reopen if this is still an issue

Changed in systemd (Ubuntu):
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.