Linux NFS development
 help / color / mirror / Atom feed
From: Uoti Urpala <uoti.urpala@pp1.inet.fi>
To: Steve Dickson <SteveD@RedHat.com>,
	Linux NFS Mailing list <linux-nfs@vger.kernel.org>
Cc: Systemd Mailing List <systemd-devel@lists.freedesktop.org>
Subject: Re: [systemd-devel] [PATCH] rpcbind.service: Not pulling the rpcbind.target
Date: Thu, 14 Dec 2017 20:47:10 +0200	[thread overview]
Message-ID: <1513277230.24220.58.camel@pp1.inet.fi> (raw)
In-Reply-To: <52fec8d7-6ba6-8f85-62e1-bc5fc5c3cf43@RedHat.com>

On Thu, 2017-12-14 at 13:24 -0500, Steve Dickson wrote:
> 
> On 12/14/2017 12:48 PM, Uoti Urpala wrote:
> > On Thu, 2017-12-14 at 12:05 -0500, Steve Dickson wrote:
> > > +Wants=rpcbind.socket rpcbind.target
> > > +After=rpcbind.socket rpcbind.target
> > 
> > Is this needed when the service has socket activation support? If the
> > only interaction with it is through the socket, it shouldn't matter
> > even if the service is not actually up yet - clients can already open
> > connections to the socket regardless.
> 
> Well things are working as is... but this man page paragraph 
> was pointed out to me so I though these Wants and After were needed.
> 
> So you saying this patch is not needed?

I'm not familiar enough with rpcbind stuff to say with certainty that
it wouldn't be needed, but at least it seems plausible to me that it
would not be. The mechanism described on the man page is a way to
implement ordering if needed, but if the early availability of the
socket means ordering is never an issue, then it can be ignored.


> > And regardless, that "After" for rpcbind.target seems backwards.
> > Shouldn't it be "Before", so that the target being up signals that the
> > service has already been started?
> 
> I think this makes sense... So if the patch is needed I'll add
> Before=rpcbind.target and remove the target from the After=

Yes.

> > Not directly related, but if that comment is accurate and the socket
> > should be used "no matter what", perhaps that should be "Requires"
> > instead of "Wants" so that if the socket could not be opened for some
> > reason, the service fails instead of starting without socket
> > activation?
> > 
> 
> I was afraid of opening a can a worms here... :-) 
> 
> So you are saying Wants and After should be changed to 
> 
> Requires=rpcbind.socket
> Before=rpcbind.target

Depends on the exact semantics you want. "Wants" means that systemd
will try to start the socket if the service is started, but will
continue with the service start even if the dependency fails.
"Requires" guarantees that the service will never be started without
the socket active - if opening the socket fails, then the service start
will return failure too. If you know that the socket unit should always
be used, or the service will either fail or do the wrong thing without
it (such as open a socket with parameters different from what was
configured for the socket unit, and which the admin didn't expect) then
 Requires may be more appropriate.


  reply	other threads:[~2017-12-14 18:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-14 17:05 [PATCH] rpcbind.service: Not pulling the rpcbind.target Steve Dickson
2017-12-14 17:48 ` [systemd-devel] " Uoti Urpala
2017-12-14 18:24   ` Steve Dickson
2017-12-14 18:47     ` Uoti Urpala [this message]
2017-12-14 20:20       ` Steve Dickson
2017-12-14 18:05 ` Lennart Poettering

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=1513277230.24220.58.camel@pp1.inet.fi \
    --to=uoti.urpala@pp1.inet.fi \
    --cc=SteveD@RedHat.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=systemd-devel@lists.freedesktop.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox