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 14:26:10 +0200	[thread overview]
Message-ID: <1453ed97-2d2f-4bc1-aa67-7f31491a8ec8@uls.co.za> (raw)
In-Reply-To: <f456f476-64e7-40d4-a59e-0ca16a9b377d@gentoo.org>

Hi Joonas,

On 2024/04/11 12:02, Joonas Niilola wrote:
> Hey,
>
> On 11.4.2024 9.14, Jaco Kroon wrote:
>> 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).
>>
> well I was thinking about putting that into glusterfs's init file.

Well, that's an obvious assumption now that I think about it, but 
incorrect for what I'm looking at.

There's two init scripts for glusterfs, glusterd and glusterfsd.

glusterfsd init script is being dragged along for historic purposes and 
comes from before I got involved, and I believe this was the way bricks 
were brought up prior to glusterfs version 3.0, and it does look like 
there is (u)mount stuff in there too.  This init script already has 
stuff for "need fuse" if it's mounting a glusterfs filesystem.  It looks 
interesting even now for *mounting* file systems, but in my opinion not 
for managing volumes.

IMHO the more modern/better way is to bring up glusterd on nodes that 
*host* the volumes, ie, where bricks reside, and to then mount 
filesystems from /etc/fstab using netmount as part of mounting all 
network filesystem.  Otherwise you need to duplicate the init config for 
every mountpoint and specify a large number of arguments in those ... in 
my opinion it just gets messy quite quickly.

glusterd then manages starting/stopping of brick, shd and other 
processes related to any volumes.

netmount handles mounting of network (including glusterfs) filesystems.

In many scenarios the storage nodes and those that consume them are 
independent.  In this scenario glusterd (along with bricks and shd's) 
will run on the storage nodes but not on the "compute" nodes, and there 
is no dependency between glusterd and netmount.

glusterd does need to start before netmount if (and only if) there are 
glusterfs mounts in /etc/fstab that depends on the local glusterd for 
finding volume information.  This is hard(ish) to determine (reliably), 
but given "fstabinfo" in openrc-run I could amend /etc/init.d/glusterd's 
depend to do "before netmount" iff there are filesystems in /etc/fstab 
that's relevant.  We don't (currently) have such deployments, and we 
generally do have glusterfs mounts where we run bricks, even if only to 
be able to inspect what's going on in the "constructed" filesystem, so 
the explicit "before netmount" in glusterd doesn't bother me too much 
personally (even if it starts before netmount and it's not needed, who 
cares?  So lots of effort for little gain).

glusterfs and fuse.glusterfs has already been added into 
/lib/rc/rc-functions.sh.  So technically I no longer need to flag my 
mounts with _netdev.

Incidentally:  I *suspect* the noauto detection in netmount's depend 
will only work if noauto is the *first* option for any given nfs mountpoint.

Anyway, I would thus like to suggest two "tweaks" to openrc here:

1.  net_fs_list needs to become more dynamic such that other packages 
(such as glusterfs) can add to the list dynamically.
2.  packages should be allowed to hook into netmount's depend() phase.

If 2 isn't acceptable, I'll just send the desired changes for 2 directly 
into openrc as a PR, and that kinda makes point 1 pointless as well.

Kind regards,
Jaco



  reply	other threads:[~2024-04-11 12:26 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
2024-04-11 10:02     ` Joonas Niilola
2024-04-11 12:26       ` Jaco Kroon [this message]
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=1453ed97-2d2f-4bc1-aa67-7f31491a8ec8@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