Skip to contentSkip to conversation

systemd: Have rpc-statd-notify.service Require network.target

PATCH In review Steve Dickson 3 participants 7 messages Mar 3, 2015 – Mar 19, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 systemd: Have rpc-statd-notify.service Require network.target

Its been reported that having the rpc-statd-notify service depend on network.target instead network-online.target decrease boot times as much as 10 seconds on some installs

---
 systemd/rpc-statd-notify.service |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
systemd/rpc-statd-notify.service +1 -1
index a655445..b608a14 100644
@@ -1,6 +1,6 @@
 [Unit]
 Description=Notify NFS peers of a restart
-Requires=network-online.target
+Requires=network.target
 After=network.target nss-lookup.target
 
 # if we run an nfs server, it needs to be running before we
Signature · 1 line
1.7.1
#1 lore raw

В Tue, 3 Mar 2015 13:36:43 -0500
Steve Dickson <[email protected]> пишет:

Quoted 5 lines

Its been reported that having the rpc-statd-notify service depend on network.target instead network-online.target decrease boot times as much as 10 seconds on some installs

If it does not need network when strting, it should not depend on network at all. This will probably decrease boot time even more.

If it does need network, it should depend on network-online, this is correct.

Quoted 20 lines
---
 systemd/rpc-statd-notify.service |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
systemd/rpc-statd-notify.service +1 -1
index a655445..b608a14 100644
@@ -1,6 +1,6 @@
 [Unit]
 Description=Notify NFS peers of a restart
-Requires=network-online.target
+Requires=network.target
 After=network.target nss-lookup.target
 
 # if we run an nfs server, it needs to be running before we
#2 lore raw
Quoted 9 lines · Andrei Borzenkov

В Tue, 3 Mar 2015 13:36:43 -0500
Steve Dickson <[email protected]> пишет:

Quoted 5 lines

Its been reported that having the rpc-statd-notify service depend on network.target instead network-online.target decrease boot times as much as 10 seconds on some installs

Quoted 5 lines

If it does not need network when strting, it should not depend on network at all. This will probably decrease boot time even more.

If it does need network, it should depend on network-online, this is correct.

Indeed. From the man page:
-m retry-time
Specifies the length of time, in minutes, to continue retry‐ ing notifications to unresponsive hosts. If this option is not specified, sm-notify attempts to send notifications for
15 minutes. Specifying a value of 0 causes sm-notify to
continue sending notifications to unresponsive peers until it is manually killed.

Notifications are retried if sending fails, the remote does not respond, the remote's NSM service is not registered, or if there is a DNS failure which prevents the remote's mon_name from being resolved to an address.

So rpc-statd-notify.service should be fine with being started before the network is up at all.

Zbyszek

Quoted 26 lines
Quoted 14 lines
---
 systemd/rpc-statd-notify.service |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
systemd/rpc-statd-notify.service +0 -0
index a655445..b608a14 100644

systemd/rpc-statd-notify.service line 6

Quoted 7 lines
systemd/rpc-statd-notify.service +1 -1
@@ -1,6 +1,6 @@
 [Unit]
 Description=Notify NFS peers of a restart
-Requires=network-online.target
+Requires=network.target
 After=network.target nss-lookup.target
 
 # if we run an nfs server, it needs to be running before we

_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

#3 lore raw
Quoted 10 lines · Zbigniew Jędrzejewski-Szmek

On Tue, Mar 03, 2015 at 10:06:57PM +0300, Andrei Borzenkov wrote:
Indeed. From the man page:
-m retry-time
Specifies the length of time, in minutes, to continue retry‐ ing notifications to unresponsive hosts. If this option is not specified, sm-notify attempts to send notifications for
15 minutes. Specifying a value of 0 causes sm-notify to
continue sending notifications to unresponsive peers until it is manually killed.

Quoted 7 lines

Notifications are retried if sending fails, the remote does not respond, the remote's NSM service is not registered, or if there is a DNS failure which prevents the remote's mon_name from being resolved to an address.

So rpc-statd-notify.service should be fine with being started before the network is up at all.

Right... that's the point... we want the service to fork and keep trying in the background....

Thanks for the cycles!

steved.

#4 lore raw
Quoted 18 lines · Steve Dickson
Quoted 15 lines · Zbigniew Jędrzejewski-Szmek

On Tue, Mar 03, 2015 at 10:06:57PM +0300, Andrei Borzenkov wrote:
Indeed. From the man page:
-m retry-time
Specifies the length of time, in minutes, to continue retry‐ ing notifications to unresponsive hosts. If this option is not specified, sm-notify attempts to send notifications for
15 minutes. Specifying a value of 0 causes sm-notify to
continue sending notifications to unresponsive peers until it is manually killed.

Notifications are retried if sending fails, the remote does not respond, the remote's NSM service is not registered, or if there is a DNS failure which prevents the remote's mon_name from being resolved to an address.

Quoted 4 lines
Quoted 2 lines

So rpc-statd-notify.service should be fine with being started before the network is up at all.

Right... that's the point... we want the service to fork and keep trying in the background....

...so like Andrei wrote, the dependency on network.target can be removed (I wasn't sure if it was clear what I meant).

Zbyszek

#5 lore raw
Quoted 19 lines · Zbigniew Jędrzejewski-Szmek
Quoted 18 lines · Steve Dickson
Quoted 15 lines · Zbigniew Jędrzejewski-Szmek

On Tue, Mar 03, 2015 at 10:06:57PM +0300, Andrei Borzenkov wrote:
Indeed. From the man page:
-m retry-time
Specifies the length of time, in minutes, to continue retry‐ ing notifications to unresponsive hosts. If this option is not specified, sm-notify attempts to send notifications for
15 minutes. Specifying a value of 0 causes sm-notify to
continue sending notifications to unresponsive peers until it is manually killed.

Notifications are retried if sending fails, the remote does not respond, the remote's NSM service is not registered, or if there is a DNS failure which prevents the remote's mon_name from being resolved to an address.

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

So rpc-statd-notify.service should be fine with being started before the network is up at all.

Right... that's the point... we want the service to fork and keep trying in the background....

...so like Andrei wrote, the dependency on network.target can be removed (I wasn't sure if it was clear what I meant).

I did miss the fact you guys were saying because of the 15min retry network.target is not needed... But, in reality, a network is needed/wanted so leaving it in will document that fact w/out causing any delay.

steved.

#6 lore raw
In reply to Steve Dickson
Quoted 9 lines · Steve Dickson

Its been reported that having the rpc-statd-notify service depend on network.target instead network-online.target decrease boot times as much as 10 seconds on some installs

Committed...

steved.

Quoted 17 lines
---
 systemd/rpc-statd-notify.service |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
systemd/rpc-statd-notify.service +1 -1
index a655445..b608a14 100644
@@ -1,6 +1,6 @@
 [Unit]
 Description=Notify NFS peers of a restart
-Requires=network-online.target
+Requires=network.target
 After=network.target nss-lookup.target
 
 # if we run an nfs server, it needs to be running before we