public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Jaco Kroon <jaco@uls.co.za>
To: gentoo development <gentoo-dev@lists.gentoo.org>
Subject: [gentoo-dev] netmount and glusterfs (fuse) dependency management
Date: Mon, 8 Apr 2024 11:51:52 +0200	[thread overview]
Message-ID: <e9b6b3f4-9943-4eca-877a-bf54c3697caf@uls.co.za> (raw)

Hi All,

I was hoping for some advise regarding how I could improve the glusterfs 
package for users (and myself).  At least those using openrc, but I 
suspect similar may be applicable to systemd, but I have no idea how 
systemd handles network mounts so perhaps someone could chip in here on 
that front too.

Specifically the mounting of glusterfs file systems currently has a few 
problems (glusterd if server=localhost, network, dns(?) and fuse 
availability).  For now the focus is on the fuse aspect since that's the 
biggest annoyance by far.

Mounting happens via the netmount service.

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")

I make note that there is specific code in /etc/init.d/netmount in 
depend() to handle nfsclient (if there are any nfs and nfs4 mounts it 
automatically (unless if the filesystems are also labaled noauto) to 
want nfsclient.

Two questions:

1.  Would a PR against https://github.com/openrc/openrc/ to add special 
case code for glusterfs into netmount have a reasonable chance of being 
accepted?  I don't like this, it just pushes towards an ever-growing 
list of special cases, but it's possibly preferable to having users to 
figure out they need to edit /etc/conf.d/netmount to add rc_need="fuse" ?

2.  Would it not be an improvement to consider having a more generic 
mechanism for other packages to add dependency requirements for 
netmount, for example:

/etc/netmound.depend.d/glusterfs(.sh?) could contain a function called 
depend_glusterfs() { } which gets invoked if a glusterfs filesystem will 
want to be mounted, which I would suggest would have something like:

depend_glusterfs()
{
     use glusterd
     need net fuse
}

Then if the answer to 2 is yes (which I feel it would be), then a few 
implementation details (Will attempt a PR):

What would be the best location for having these files dropped? 
Generally I'd say let's stay out of /etc/ for this since these are 
system-controlled dependencies, however, some users may have things 
rigged and may want to be able to edit or even outright ignore these 
dependencies ... ?

/lib/netmount.dependencies.d/ being over-shadowed by 
/etc/netmount.dependencies.d?

So any file for which an equivalent in /etc/netmount.dependencies.d/ 
exist is ignored in /lib/ (similar to udev/rules.d)?

Source all files in those locations, or try them based on filesystem 
types to be mounted only (first /etc then /lib variants)?

Kind regards,
Jaco



             reply	other threads:[~2024-04-08  9:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-08  9:51 Jaco Kroon [this message]
2024-04-11  5:11 ` [gentoo-dev] netmount and glusterfs (fuse) dependency management Joonas Niilola
2024-04-11  6:14   ` Jaco Kroon
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=e9b6b3f4-9943-4eca-877a-bf54c3697caf@uls.co.za \
    --to=jaco@uls.co.za \
    --cc=gentoo-dev@lists.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