[systemd-devel] [PATCH 2/4] mount-setup: introduce mount_setup_run_dirs()

Daniel J Walsh dwalsh at redhat.com
Wed Oct 8 04:52:46 PDT 2014


On 10/08/2014 07:40 AM, Lennart Poettering wrote:
> On Tue, 07.10.14 14:14, Michal Sekletar (msekleta at redhat.com) wrote:
>
>>> Hence, if a container manager mounts everything properly, then mount_setup()
>>> should be a NOP anyway... 
>> In theory yes, but in fact not having /run mounted as tmpfs is default in the docker
>> container. I have no strong opinion on whether this is sensible or not, however
>> I think that systemd can be made more resilient and handle such
>> cases. 
> Sorry, but no. /run should be pre-mounted, and if it isn't we need the
> rights to mount it. We will not boot up a system without /run. That's
> part of the API for programs, and we will not avoid it.
>
> Please ask Docker to premount /run. All distros need /run anyway these
> days, Debian does, Ubuntu does, Fedora does. 
>
>> Now systemd will try to mount /run on tmpfs, such attempt will fail because of
>> missing capability and then systemd will just hang.
> Well, just sticking the head in the sand won't help. If we don't have
> /run mounted, then things will break later on. We cannot ignore that.
>
> Sorry,
>
> Lennart
>
We have a patch for this.  In the past docker has bocked/removed the
patch because there is
no concept of systemd-tmpfs inside a container to pre-populate /run.  So
images came with content in their
/run.

Alex wrote a patch to scan the /run on the image and create the content
in a tmpfs /run.  I will attempt to push this
patch again to docker.




More information about the systemd-devel mailing list