/var/tmp is not a partition (it is)
Closed this issue · 4 comments
Getting
1.1.7_var_tmp_partition [ KO ] /var/tmp is not a partition
even through /var/tmp
is a tmpfs. This seems to be because /etc/fstab
is used to check if a given mountpoint is a partition. In containers, this might not work. Maybe use mountpoint
instead?
# mountpoint /var/tmp/
/var/tmp/ is a mountpoint
Yes in fact you're right, but is it really useful to run this kind of check in containers ?
My guess is there is some other bugs in container because the scripts were not designed to be run on containers.
I think it depends: for containers having only one binary running, i.e. a go program for example, probably not.
But for some other kind of containers that are more like "light VMs", with a syslogd, a crond, a nullmailer and maybe a service daemon running (apache, nginx, postgresql, whatever) and all of those handled by either supervisord or systemd as PID 1 of the container, it might!
Ok, any idea about how to deal with the default mount option of the partition ? Because it seems to me that the only place where they are is in /etc/fstab
.
So I see how to rewrite is_a_partition
function, but I don't really now how to deal with the has_mount_option
function.
I think checking in /etc/fstab
is still the good way to do it by default, but if either you detect you're running in a container (which might be useful if you want to modify the behavior of some other tests when this is the case) and/or you detect that there's no /etc/fstab
or that it seems dummy/empty, then falling back to checking the actual mount options of the partition as they're right now is probably the only way (i.e. /proc/mounts
or such).