[systemd-devel] Making /run respect Container Memory Limits

Matthew Ife matthew at ife.onl
Mon Sep 23 10:58:06 UTC 2024


> /run/ is only mounted by systemd if it is not pre-mounted already by
> the container manager. We generally assume the container manager does
> that (for example systemd-nspawn does it that way), already because
> /run/host/ is the mechanism to pass outside info/resources into the
> container in a systemd world, hence it really needs to be premounted.

I think theabove is enough to know the right answer. 
Fix the container manager to behave correctly. This feels like the most elegant approach.

I didn't spot this when trying to understand the best approach to change things. Apologies.

Note, you're right about how we do stupid things like disabling swap. Its not my call sadly!
Whilst I dont think the answer here is "adding swap will fix" there are a myriad other reasons to
have swap and it would at least elongate the cliff-edge we have with this problem otherwise.

Thanks for your time.


More information about the systemd-devel mailing list