linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Prokop <mika@debian.org>
To: Salvatore Bonaccorso <carnil@debian.org>
Cc: NeilBrown <neilb@suse.de>, Steve Dickson <steved@redhat.com>,
	linux-nfs@vger.kernel.org,
	Andras Korn <korn-debbugs@elan.rulez.org>,
	Marco d'Itri <md@linux.it>
Subject: Re: [PATCH 4/4] systemd: Apply all sysctl settings through udev rule when NFS-related modules are loaded
Date: Fri, 25 Nov 2022 14:29:35 +0100	[thread overview]
Message-ID: <2022-11-25T14-20-47@devnull.michael-prokop.at> (raw)
In-Reply-To: <20221125130725.1977606-5-carnil@debian.org>

[-- Attachment #1: Type: text/plain, Size: 1402 bytes --]

Hi,

* Salvatore Bonaccorso [Fri Nov 25, 2022 at 02:07:25PM +0100]:

> sysctl settings (e.g.  /etc/sysctl.conf and others) are normally loaded
> once at boot.  If the module that implements some settings is no yet
> loaded, those settings don't get applied.
> 
> Various NFS modules support various sysctl settings.  If they are loaded
> after boot, they miss out.
> 
> Add a new udev rule configuration to udev/rules.d/60-nfs.rules to apply
> the relevant settings when the module is loaded.
> 
> Placing it in the systemd directory similarly as the coice for the
> original commit afc7132dfb21 ("systemd: Apply all sysctl settings when
> NFS-related modules are loaded").
[...]

> --- /dev/null
> +++ b/systemd/60-nfs.rules
> @@ -0,0 +1,21 @@
> +# Ensure all NFS systctl settings get applied when modules load
> +
> +# sunrpc module supports "sunrpc.*" sysctls
> +ACTION=="add", SUBSYSTEM=="module", KERNEL=="sunrpc", \
> +  RUN+="/sbin/sysctl -q --pattern ^sunrpc --system"
[...]

Thanks for taking care of this problem, Salvatore!

AFAICT even latest busybox's sysctl does not support the `--pattern`
option yet:

| sysctl: unrecognized option '--pattern'
| BusyBox v1.35.0 (Debian 1:1.35.0-4) multi-call binary.
| [....]

So any initramfs that uses busybox and its sysctl (like in Debian)
and trying to apply above udev rules might fail?

regards
-mika-

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2022-11-25 13:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-25 13:07 [PATCH 0/4] Replace sysctl setting invocations triggered from udev rule instead of modprobe configuration Salvatore Bonaccorso
2022-11-25 13:07 ` [PATCH 1/4] Revert "configure: make modprobe.d directory configurable." Salvatore Bonaccorso
2022-11-25 13:07 ` [PATCH 2/4] Revert "modprobe: protect against sysctl errors" Salvatore Bonaccorso
2022-11-25 13:07 ` [PATCH 3/4] Revert "systemd: Apply all sysctl settings when NFS-related modules are loaded" Salvatore Bonaccorso
2022-11-25 13:07 ` [PATCH 4/4] systemd: Apply all sysctl settings through udev rule when NFS-related modules are loaded Salvatore Bonaccorso
2022-11-25 13:29   ` Michael Prokop [this message]
2022-11-25 16:21     ` Salvatore Bonaccorso
2022-11-25 16:27       ` Michael Prokop

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=2022-11-25T14-20-47@devnull.michael-prokop.at \
    --to=mika@debian.org \
    --cc=carnil@debian.org \
    --cc=korn-debbugs@elan.rulez.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=md@linux.it \
    --cc=neilb@suse.de \
    --cc=steved@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).