netplan.io postinst script creates entries in /run/systemd/system

Bug #2071444 reported by Pavel Zakharov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Netplan
New
Undecided
Unassigned

Bug Description

The bug affects version 0.106.1-7ubuntu0.22.04.3 on jammy. Version 0.106.1-7ubuntu0.22.04.2 is not affected.

netplan.io postinst script runs /usr/libexec/netplan/generate, which creates directory /run/systemd/system and some files in it:

```
# ls -R /run/systemd/system
/run/systemd/system:
netplan-ovs-cleanup.service systemd-networkd.service.wants

/run/systemd/system/systemd-networkd.service.wants:
netplan-ovs-cleanup.service
```

The problem is that netplan creates those files even on a system that is not booted, such as in a chroot when building a new OS with the netplan.io package. The immediate impact is that lots of other programs / scripts, check for the existence of /run/systemd/system to determine if systemd is running, and thus if it does exist then they attempt to run systemd commands.

In some cases this causes failures, which fail the entire build.

The right behaviour for netplan.io's generate command should be to check for the existence of directory /run/systemd/system before creating anything in there.

Revision history for this message
Danilo Egea Gondolfo (danilogondolfo) wrote :

Hi, thanks for your bug report.

We are already of this issue and working on a fix.

Please refer to this bug https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/2071333

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.