From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id DEC72158041 for ; Mon, 8 Apr 2024 09:52:04 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CF678E2A0F; Mon, 8 Apr 2024 09:51:59 +0000 (UTC) Received: from uriel.iewc.co.za (uriel.iewc.co.za [IPv6:2c0f:f720:0:3::9a49:2248]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 99B2DE2A0A for ; Mon, 8 Apr 2024 09:51:58 +0000 (UTC) Received: from [154.73.32.4] (helo=tauri.local.uls.co.za) by uriel.iewc.co.za with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.97.1) (envelope-from ) id 1rtlfO-000000000qU-22fo for gentoo-dev@lists.gentoo.org; Mon, 08 Apr 2024 11:51:54 +0200 Received: from [192.168.42.198] by tauri.local.uls.co.za with esmtp (Exim 4.97.1) (envelope-from ) id 1rtlfN-000000003yf-01k2 for gentoo-dev@lists.gentoo.org; Mon, 08 Apr 2024 11:51:53 +0200 Message-ID: Date: Mon, 8 Apr 2024 11:51:52 +0200 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-GB To: gentoo development From: Jaco Kroon Subject: [gentoo-dev] netmount and glusterfs (fuse) dependency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CHbMELYKDr3tUdUfCDqVjipCzHmLZ+xMisfn yX9aTVI3FUIs8UiqM5xlxqfuCnDrKBJjQs3uvmd6cyhPRmnsjase48RoO84Ckjbp/HVu0+1+ 6vgiPjbe4xk7Ehkw1mfSxb79ABEBAAHCwF8EGAEIAAkFAlXtplYCGwwACgkQCC3Esa/37p7u XwgAjpFzUj+GMmo8ZeYwHH6YfNZQV+hfesr7tqlZn5DhQXJgT2NF6qh5Vn8TcFPR4JZiVIkF o0je7c8FJe34Aqex/H9R8LxvhENX/YOtq5+PqZj59y9G9+0FFZ1CyguTDC845zuJnnR5A0lw FARZaL8T7e6UGphtiT0NdR7EXnJ/alvtsnsNudtvFnKtigYvtw2wthW6CLvwrFjsuiXPjVUX 825zQUnBHnrED6vG67UG4z5cQ4uY/LcSNsqBsoj6/wsT0pnqdibhCWmgFimOsSRgaF7qsVtg TWyQDTjH643+qYbJJdH91LASRLrenRCgpCXgzNWAMX6PJlqLrNX1Ye4CQw== Organization: Ultimate Linux Solutions (Pty) Ltd Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-report: Relay access (uriel.iewc.co.za). X-Archives-Salt: 5f3e697f-9bc3-4f3b-b83f-001d059318f8 X-Archives-Hash: 8c3fefa7c81b7b5e9e9f4157b95c2b53 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