[systemd-devel] RootImage and tmpfs on /run not always there

Thorsten Kukuk kukuk at suse.com
Tue Aug 27 10:38:37 UTC 2024


Hi,

When playing with soft-reboot and services running from a root image
(in this case btrfs subvolume), I run into something which looks like
a bug for me.
So the service files have:
RootImage=/dev/vda2
RootImageOptions=ro,subvolid=278

If a service file has any of the following three keywords in the
service section (this example is from bind):
Type=forking
KillMode=process
ExecStartPre=+/usr/libexec/bind/named.prep

Then /run will not be created with tmpfs. If I remove all three
keywords, /run will be created with tmpfs.

Is there a special logic behind this? Or just a bug?

With all other services I tested until now, I have in the logs:
Aug 27 08:11:07 microos (rsyncd)[1452]: Applying namespace mount on
/run/systemd/mount-rootfs/run
Aug 27 08:11:07 microos (rsyncd)[1452]: Mounting tmpfs (tmpfs) on
/run/systemd/mount-rootfs/run (0 "")...

and it is working.  But this two lines are missing with bind and all
following operations will fail:
Aug 27 10:25:11 microos (med.prep)[2442]: Applying namespace mount on
/run/systemd/mount-rootfs/run/dbus/system_bus_socket
Aug 27 10:25:11 microos (med.prep)[2442]: Followed source symlinks
/run/dbus/system_bus_socket → /run/dbus/system_bus_socket.
Aug 27 10:25:11 microos (med.prep)[2442]: Bind-mounting
/run/dbus/system_bus_socket on
/run/systemd/mount-rootfs/run/dbus/system_bus_socket (MS_BIND|MS_REC
"")...
Aug 27 10:25:11 microos (med.prep)[2442]: Failed to mount
/run/dbus/system_bus_socket (type n/a) on
/run/systemd/mount-rootfs/run/dbus/system_bus_socket (MS_BIND|MS_REC
""): No such file or directory
Aug 27 10:25:11 microos (med.prep)[2442]: Failed to create destination
mount point node
'/run/systemd/mount-rootfs/run/dbus/system_bus_socket', ignoring: No
such file or directory
Aug 27 10:25:11 microos (med.prep)[2442]: Failed to mount
/run/dbus/system_bus_socket to
/run/systemd/mount-rootfs/run/dbus/system_bus_socket: No such file or
directory
Aug 27 10:25:11 microos (med.prep)[2442]: bind.service: Failed to set
up mount namespacing: /run/dbus/system_bus_socket: No such file or
directory

 Thanks,
   Thorsten

-- 
Thorsten Kukuk, Distinguished Engineer, Senior Architect, Future Technologies
SUSE Software Solutions Germany GmbH, Frankenstraße 146, 90461
Nuernberg, Germany
Managing Director: Ivo Totev, Andrew McDonald, Werner Knoblich (HRB
36809, AG Nürnberg)


More information about the systemd-devel mailing list