public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Jaco Kroon <jaco@uls.co.za>
To: gentoo-dev@lists.gentoo.org, Joonas Niilola <juippis@gentoo.org>
Subject: Re: [gentoo-dev] netmount and glusterfs (fuse) dependency management
Date: Thu, 11 Apr 2024 08:14:55 +0200	[thread overview]
Message-ID: <a2326642-5362-4e59-9423-21afa21ef84a@uls.co.za> (raw)
In-Reply-To: <6c3aabbf-a4ec-4d0a-97d4-a7b7e01b678e@gentoo.org>

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



  reply	other threads:[~2024-04-11  6:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-08  9:51 [gentoo-dev] netmount and glusterfs (fuse) dependency management Jaco Kroon
2024-04-11  5:11 ` Joonas Niilola
2024-04-11  6:14   ` Jaco Kroon [this message]
2024-04-11 10:02     ` Joonas Niilola
2024-04-11 12:26       ` Jaco Kroon
2024-04-11 15:53 ` Mike Gilbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a2326642-5362-4e59-9423-21afa21ef84a@uls.co.za \
    --to=jaco@uls.co.za \
    --cc=gentoo-dev@lists.gentoo.org \
    --cc=juippis@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox