Allow pots without tmpfs-backed /tmp directory
grembo opened this issue · 1 comments
Is your feature request related to a problem? Please describe.
Right now, /tmp is always backed by tmpfs (see https://github.com/pizzamig/pot/blob/d19f779484d0228a2304fad57b0e45bd66d703b7/share/pot/common.sh#L920).
This makes individual pots consume RAM and also creates a lot of additional mountpoints when running many small pots, especially when using nomad, where pots only run once and then get pruned.
Describe the feature you'd like to have
It would be nice to be able to disable the use of tmpfs - either per pot, or at least as a global switch, which should be easy to implement.
Describe potential alternatives or workaround you've considered (if any)
Nothing that isn't dirty comes to mind, but I could provide a patch for a global switch if @pizzamig is okay with it and if there are no assumptions made in pot about tmp being backed by memory.
I see your point.
I guess the best way to implement it is via an attribute, available for single dataset only, where the root file system is mounted rw.
Multi-dataset can mount /
in read-only mode, making the implementation more complicated (even if still doable)