Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp10876644rwb; Fri, 25 Nov 2022 08:40:40 -0800 (PST) X-Google-Smtp-Source: AA0mqf7pqGMf9+ssvQXWnKCH1n+XMsQLj5KMUpNlW7v0teTISfIh0cosZ6d8lcUzxt0PHHO/7Kyq X-Received: by 2002:a63:140e:0:b0:477:b461:3a3b with SMTP id u14-20020a63140e000000b00477b4613a3bmr13474651pgl.623.1669394439992; Fri, 25 Nov 2022 08:40:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669394439; cv=none; d=google.com; s=arc-20160816; b=RIkSj7eVXeomwOo5DlsoF4ItRmlgMsBDYGkW7TBZz1BNdrkeE5Te9X8ZOuMMrFtHsr ImofF0NWL0VTlimL76NwL4l59WNhhVLwWExkwrP5JtBwYXtHy0OJaiHx89pZ08xETBpg pLWOfGwk+dmfVdxlqB89olYbPleAS90GBvX7NE2F7ZA0dE6RQCL2y9r6uGsXhrF+xa/5 EYbwM2iNR9BivcPYaim5erJx4ecX4qu+McTizlvJhJfhxZQp8kJk2YALahOX1CdN2K/4 O4vSaFoZfFeMQIW6IRB68XixdqdmSiuJc7RrXYZWIpHuc3eSzXJlqv0ZLAZGCbd/oXiF j/JA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=SIgayctDiknOripeKawJYn/fHpd29IxwNZyTuVOn53I=; b=AbCHt5coXb/Er5Z9vYK/nqZiFRG3gIgJaPIbELTvJ+OEFbbF7oRxH170nY+vpzRi8K E26ongIMJM4Fxp3tLIebCcvhdkUCs135/SXN75L33hNW91Zj1Cn6ZW6iKEVaVxvtr+SA eJBatnFjrqr9ts6xDGmSAcfMSVcwA7gtekbt9p8NPnwXIsMOdU/hGesC/grDhoisoknw zz3gHGEsSNNajcsCZCFTPHsztg0tW6dRSjD6cAzAB/T6/N0p8ywG0B4jH0JE/QlUvpHW LNPx8PfyH0wj4JX9T+MsZzyCwxEJgnHJYQnz3tWozB24w8R/IXcObLZmdQay9JAB2sb/ 0Y2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@debian.org header.s=smtpauto.stravinsky header.b=nzphFVD9; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y7-20020a63e247000000b0046ef23ae9a6si565439pgj.848.2022.11.25.08.40.26; Fri, 25 Nov 2022 08:40:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@debian.org header.s=smtpauto.stravinsky header.b=nzphFVD9; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229575AbiKYQfB (ORCPT + 99 others); Fri, 25 Nov 2022 11:35:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229480AbiKYQfA (ORCPT ); Fri, 25 Nov 2022 11:35:00 -0500 X-Greylist: delayed 783 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 25 Nov 2022 08:34:59 PST Received: from stravinsky.debian.org (stravinsky.debian.org [IPv6:2001:41b8:202:deb::311:108]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D38F5209AB for ; Fri, 25 Nov 2022 08:34:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debian.org; s=smtpauto.stravinsky; h=X-Debian-User:In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=SIgayctDiknOripeKawJYn/fHpd29IxwNZyTuVOn53I=; b=nzphFVD9PJuSVIpyEgzH6p6fFm +sHzLAEuYc+OXsWTXSm6zWRTK+DocNiVzR98TXKgYjcobWyR7tzvZZb3s5xlPSW/meeKy663BL9WK oHroVVkLowSyes+VorEcIBgElNe4RYJ5NC+Sg/VrPe1WTWvwSUaOH3mGfYkcSXC1Nye87CFMfft/d AQRkAC+wMuwEjUhOQ62QWE3H/cxhCQ2kkjOR/iS7BRKRXxYQ9LUmbZgOQnqPQiKu17lC/2A7A5ZRI AfLcbxoajVU4jb0S6JxO5j1zNli4ltpW10EeTJUxgx0WyJtTDc1htvSQxE1fORDfIkCEFVQT+oLB6 4JpEjR8g==; Received: from authenticated user by stravinsky.debian.org with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94.2) (envelope-from ) id 1oybSR-003nCM-Fx; Fri, 25 Nov 2022 16:21:43 +0000 Received: by eldamar.lan (Postfix, from userid 1000) id ED63CBE2DE0; Fri, 25 Nov 2022 17:21:41 +0100 (CET) Date: Fri, 25 Nov 2022 17:21:41 +0100 From: Salvatore Bonaccorso To: Michael Prokop Cc: NeilBrown , Steve Dickson , linux-nfs@vger.kernel.org, Andras Korn , Marco d'Itri Subject: Re: [PATCH 4/4] systemd: Apply all sysctl settings through udev rule when NFS-related modules are loaded Message-ID: References: <20221125130725.1977606-1-carnil@debian.org> <20221125130725.1977606-5-carnil@debian.org> <2022-11-25T14-20-47@devnull.michael-prokop.at> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2022-11-25T14-20-47@devnull.michael-prokop.at> X-Debian-User: carnil X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Hi Michael, On Fri, Nov 25, 2022 at 02:29:35PM +0100, Michael Prokop wrote: > 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! Thanks to you for prodding about it, hope to bring the issue bit forward with the series proposal. > 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? But would this actually be a problem for us here? There is no hook script which would copy the 60-nfs.rules (not relevant in initrd) to the initrd. The rule only would apply on module load outside the initrd. There is only a subset of rules which would be copied into initrd, like the ones in hook/udev. But 60-nfs.rules would be specific to nfs-utils, which does not provide a initramfs-tools hook to include the rules into initrd. Now the question you raise, is, do they need to be handled actually already as well in initrd? You are correct, when handled through the previous mechanism with modrobe.d configuration, 50-nfs.conf was added to initramfs: usr/lib/modprobe.d/50-nfs.conf (and causing the issues seen). Please correct me if I missed something from the picture. Regards, Salvatore