Open dustymabe opened 7 years ago
This is more of an ostree thing I'd say. Hmm, I think we want /tmp
to always either be tmpfs
or a bind mount to /var/tmp
. That's something we could possibly hardcode effectively, so that if an admin does systemctl mask tmp.mount
, we set this unit up automatically.
Implementation wise I think what would work best would be to add this logic to ostree-systemd-generator
. That way we can parse /etc/fstab
and not generate the mount if there's one for /tmp
there.
Is fstab a 'good enough' place these days. i know it used to be but we also have mount unit files which might not make that the case any longer.
where is the ostree-systemd-generator
?
By design, generator content goes into /run
, and .mount
units the admin writes into /etc
take precedence.
The generator was introduced in https://github.com/ostreedev/ostree/pull/859
Recently there was a merged PR to support /tmp as directory this has the side-effect of now making it so that our Fedora cloud images will now start using tmpfs on /tmp again. Colin attempted to keep this behavior with this patch to our cloud kickstart:
Since this is something that other users could ask us how to do I think it would be worth us including the systemd unit by default on our installed systems and just leave it disabled by default. If users ask us how to disable tmpfs on tmp in the future we can just tell them to
systemctl enable ostree-no-tmpfs-on-tmp.mount
without having to link them to some unit file we'll have to look up every time.Thoughts?