All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Dickson <SteveD@RedHat.com>
To: Linux NFS Mailing list <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH] systemd: NFS server services should use network-online
Date: Mon, 10 Apr 2017 09:33:36 -0400	[thread overview]
Message-ID: <152615f2-8fa5-00b1-dc5e-735deb6193d6@RedHat.com> (raw)
In-Reply-To: <20170410112341.10700-1-steved@redhat.com>



On 04/10/2017 07:23 AM, Steve Dickson wrote:
> There has been an number startup problems where parts of
> the NFS server fails to start due to DNS and other
> parts of the network not be up.
> 
> Reading the systemd.special it seems network.target is
> a passive unit which does not wait for the entire
> network to come up and network-online.target is an
> active unit which does wait.
> 
> So this adds Wants=network-online.target to all of
> the NFS server services
> 
> Signed-off-by: Steve Dickson <steved@redhat.com>
Committed... 

steved.
> ---
>  systemd/nfs-mountd.service       | 2 +-
>  systemd/nfs-server.service       | 4 ++--
>  systemd/rpc-statd-notify.service | 2 +-
>  systemd/rpc-statd.service        | 3 ++-
>  4 files changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/systemd/nfs-mountd.service b/systemd/nfs-mountd.service
> index b0a8bc0..fec0399 100644
> --- a/systemd/nfs-mountd.service
> +++ b/systemd/nfs-mountd.service
> @@ -2,8 +2,8 @@
>  Description=NFS Mount Daemon
>  DefaultDependencies=no
>  Requires=proc-fs-nfsd.mount
> +Wants=network-online.target
>  After=proc-fs-nfsd.mount
> -After=network.target local-fs.target
>  After=rpcbind.socket
>  BindsTo=nfs-server.service
>  
> diff --git a/systemd/nfs-server.service b/systemd/nfs-server.service
> index 7cf4ae0..e6b8f58 100644
> --- a/systemd/nfs-server.service
> +++ b/systemd/nfs-server.service
> @@ -3,11 +3,11 @@ Description=NFS server and services
>  DefaultDependencies=no
>  Requires= network.target proc-fs-nfsd.mount
>  Requires= nfs-mountd.service
> -Wants=rpcbind.socket
> +Wants=rpcbind.socket network-online.target
>  Wants=rpc-statd.service nfs-idmapd.service
>  Wants=rpc-statd-notify.service
>  
> -After= local-fs.target network-online.target
> +After= local-fs.target
>  After= proc-fs-nfsd.mount rpcbind.socket nfs-mountd.service
>  After= nfs-idmapd.service rpc-statd.service
>  Before= rpc-statd-notify.service
> diff --git a/systemd/rpc-statd-notify.service b/systemd/rpc-statd-notify.service
> index 7bfc9b1..f54d4c5 100644
> --- a/systemd/rpc-statd-notify.service
> +++ b/systemd/rpc-statd-notify.service
> @@ -1,7 +1,7 @@
>  [Unit]
>  Description=Notify NFS peers of a restart
>  DefaultDependencies=no
> -Requires=network.target
> +Wants=network-online.target
>  After=local-fs.target network.target nss-lookup.target
>  
>  # if we run an nfs server, it needs to be running before we
> diff --git a/systemd/rpc-statd.service b/systemd/rpc-statd.service
> index 60d600f..8cef022 100644
> --- a/systemd/rpc-statd.service
> +++ b/systemd/rpc-statd.service
> @@ -3,7 +3,8 @@ Description=NFS status monitor for NFSv2/3 locking.
>  DefaultDependencies=no
>  Conflicts=umount.target
>  Requires=nss-lookup.target rpcbind.socket
> -After=network.target nss-lookup.target rpcbind.socket
> +Wants=network-online.target
> +After=nss-lookup.target rpcbind.socket
>  
>  PartOf=nfs-utils.service
>  
> 

  reply	other threads:[~2017-04-10 13:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-10 11:23 [PATCH] systemd: NFS server services should use network-online Steve Dickson
2017-04-10 13:33 ` Steve Dickson [this message]
2017-04-19 14:19 ` Steve Dickson

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=152615f2-8fa5-00b1-dc5e-735deb6193d6@RedHat.com \
    --to=steved@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.