public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
* Boot time improvement with systemd and nfs-utils
@ 2021-01-04 11:32 Hackintosh Five
  2021-01-04 12:27 ` Chuck Lever
  0 siblings, 1 reply; 9+ messages in thread
From: Hackintosh Five @ 2021-01-04 11:32 UTC (permalink / raw)
  To: linux-nfs

rpc-statd-notify is causing a 10 second hang on my system during boot
due to an unwanted dependency on network-online.target. This
dependency isn't needed anyway, because rpc-statd-notify (sm-notify)
will wait for the network to come online if it isn't already (up to 15
minutes, so no risk of timeout that would be avoided by systemd)
=============================================
From c90bd7e701c2558606907f08bf27ae9be3f8e0bf Mon Sep 17 00:00:00 2001
From: Hackintosh 5 <git@hack5.dev>
Date: Sat, 2 Jan 2021 14:28:30 +0000
Subject: [PATCH] systemd: network-online.target is not needed for
 rpc-statd-notify.service

Commit 09e5c6c2 changed the After line for rpc-statd-notify to change
network.target to network-online.target, which is incorrect, because
sm-notify has a default timeout of 15 minutes, which is longer than
the timeout for network-online.target. In other words, the dependency
on network-online.target is useless and delays system boot by ~10
seconds.
---
 systemd/rpc-statd-notify.service | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/systemd/rpc-statd-notify.service
b/systemd/rpc-statd-notify.service
index aad4c0d2..8a40e862 100644
--- a/systemd/rpc-statd-notify.service
+++ b/systemd/rpc-statd-notify.service
@@ -1,8 +1,8 @@
 [Unit]
 Description=Notify NFS peers of a restart
 DefaultDependencies=no
-Wants=network-online.target
-After=local-fs.target network-online.target nss-lookup.target
+Wants=network.target
+After=local-fs.target network.target nss-lookup.target

 # if we run an nfs server, it needs to be running before we
 # tell clients that it has restarted.
-- 
2.29.2

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-01-05 14:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-04 11:32 Boot time improvement with systemd and nfs-utils Hackintosh Five
2021-01-04 12:27 ` Chuck Lever
2021-01-04 12:51   ` Hackintosh Five
2021-01-04 12:54     ` Chuck Lever
     [not found]       ` <CAL5u83Fxd2rGuYuaghcC4irUtscmXr5-p36Qqf4+FwtctZJFaQ@mail.gmail.com>
     [not found]         ` <07383012-D499-498E-A194-716ABE1DE4C2@oracle.com>
2021-01-04 16:03           ` Hackintosh Five
2021-01-04 18:00             ` Chuck Lever
2021-01-04 18:53               ` Hackintosh Five
2021-01-04 18:55               ` [PATCH v2] systemd: rpc-statd-notify.service can run in the background Hackintosh 5
2021-01-05 14:48                 ` Tom Talpey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox