Hi Joonas,
Thanks for the below. Further comments there.
On 2024/04/11 07:11, Joonas Niilola wrote:
On 8.4.2024 12.51, Jaco Kroon wrote:
In order for glusterfs to mount successfully the fuse module needs to be
available when mount.glusterfs is invoked. This can be achieved in one
of two ways:
1. Compile the module statically into the kernel.
2. Arrange for fuse service to be started prior to netmount (using say
/etc/conf.d/netmount rc_need="fuse")
3. Add "/sbin/modprobe -q fuse" to the init.d file's start_pre()
function, ExecStartPre with systemd, and make the ebuild warn about
CONFIG_FUSE_FS with linux-info.eclass.
The latter can certainly be done and makes sense (only required if
you're using the fuse mount, so if USE=fuse at least).
The former doesn't make sense to do blindly in /etc/init.d/netmount
(which belongs to sys-apps/openrc, not glusterfs).
If you look at /etc/init.d/netmount it has some special logic in
depend() to want nfsclient if (and only if) there is at least one
filesystem with fs type nfs or nfs4.
The logic for depending on /etc/init.d/fuse should be similar, but I
don't think it makes sense to keep indefinitely expanding that depend()
for every possible future filesystem that may have some special need
like this. So I think what we should rather do is find all fstab
entries with _netdev and !noauto's fstype, and iterate those and add the
relevant want's from there (for openrc at least), in some mechanisms
where packages other than openrc can *supply* the relevant dependency
list (eg, glusterfs package would say that it want's net, dns and fuse).
Something similar for systemd would be great, but I'd have to study up
on systemd a bit before I can comment in greater detail.
At an absolute minimum I think we should amend netmount to add "use
fuse" such that if fuse is added to the relevant runlevels it will start
before netmount (and then I an arrange that message be added to the
glusterfs ebuild that fuse should be added to the default (where
netmount is) runlevel). As it is one can rc_need=fuse in
/etc/conf.d/netmount, or rc_use=fuse and add fuse to default runlevel,
but I believe we can do better than either of these options.
Kind regards,
Jaco