From: NeilBrown <neilb@suse.com>
To: Rafael David Tinoco <rafael.tinoco@canonical.com>,
linux-nfs@vger.kernel.org
Subject: Re: [PATCH] Fix nfs-mountd dependency on rpcbind
Date: Wed, 08 Feb 2017 10:03:05 +1100 [thread overview]
Message-ID: <874m05wqmu.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <20170207191650.19219-1-rafael.tinoco@canonical.com>
[-- Attachment #1: Type: text/plain, Size: 1887 bytes --]
On Tue, Feb 07 2017, Rafael David Tinoco wrote:
> Following commit 91da135f - it replaced "rpcbind.target" by "rpcbind.socket" in
> some unit files - "rpcbind.socket" should also be added to "nfs-mountd.service"
> as a dependency to avoid race conditions.
>
> Usually "rpcbind.socket" is either started as a "sockets.target" dependency, or
> as a dependency for "nfs-server.service", when unit files include it in
> "BindsTo" or "After". Unfortunately there is a possilibility to have
> "nfs-mountd.service" started when the rpcbind socket is not yet created:
>
> systemd[1]: Starting NFS Mount Daemon...
> systemd[1]: nfs-mountd.service: Control process exited, code=exited status=1
> systemd[1]: Failed to start NFS Mount Daemon.
> systemd[1]: nfs-mountd.service: Unit entered failed state.
> systemd[1]: nfs-mountd.service: Failed with result 'exit-code'.
>
> Nowadays "nfs-mountd.service" uses "BindTo" directive to "nfs-server.service".
> That, per se, doesn't guarantee ordering for NFS server to start rpcbind and for
> nfs-mountd to depend on it.
>
> https://bugs.launchpad.net/bugs/1590799
>
> Signed-off-by: Rafael David Tinoco <rafael.tinoco@canonical.com>
Thanks for finding this!
Reviewed-by: NeilBrown <neilb@suse.com>
I would not be against adding
Wants=rpcbind.socket
but as you say, it isn't strictly needed.
Thanks,
NeilBrown
> ---
> systemd/nfs-mountd.service | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/systemd/nfs-mountd.service b/systemd/nfs-mountd.service
> index 15e828b..b0a8bc0 100644
> --- a/systemd/nfs-mountd.service
> +++ b/systemd/nfs-mountd.service
> @@ -4,6 +4,7 @@ DefaultDependencies=no
> Requires=proc-fs-nfsd.mount
> After=proc-fs-nfsd.mount
> After=network.target local-fs.target
> +After=rpcbind.socket
> BindsTo=nfs-server.service
>
> [Service]
> --
> 2.9.3
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2017-02-07 23:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-07 19:16 [PATCH] Fix nfs-mountd dependency on rpcbind Rafael David Tinoco
2017-02-07 23:03 ` NeilBrown [this message]
2017-02-16 10:22 ` 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=874m05wqmu.fsf@notabene.neil.brown.name \
--to=neilb@suse.com \
--cc=linux-nfs@vger.kernel.org \
--cc=rafael.tinoco@canonical.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).