From: "Richard W.M. Jones" <rjones@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: den@openvz.org, stefanha@gmail.com, dplotnikov@virtuozzo.com,
qemu-devel@nongnu.org, rkagan@virtuozzo.com
Subject: Re: [Qemu-devel] [PATCH v3] qemu-nbd: Implement socket activation.
Date: Fri, 3 Feb 2017 19:22:44 +0000 [thread overview]
Message-ID: <20170203192244.GC13825@redhat.com> (raw)
In-Reply-To: <25dc57d6-ded3-9e4a-92cf-e678d0c92a27@redhat.com>
On Fri, Feb 03, 2017 at 10:58:15AM -0800, Paolo Bonzini wrote:
> On 03/02/2017 10:56, Richard W.M. Jones wrote:
> > On Fri, Feb 03, 2017 at 09:31:43AM -0800, Paolo Bonzini wrote:
> >> On 03/02/2017 09:09, Richard W.M. Jones wrote:
> >>> + if (fork_process) {
> >>> + return "Fork (--fork) can't be used with socket activation";
> >>> + }
> >>
> >> Why not? You could have a Type=forking foo.service, which makes little
> >> sense but would work.
> >
> > The answer, I think, is because systemd will lose track of the PID of
> > the qemu-nbd process. This would be important because systemd can
> > kill a socket-activated service which is idle.
> >
> > Normally you would work around that by using PIDFile=... in the unit
> > file, but it looks like qemu-nbd doesn't support pid files.
>
> PIDFile is recommended indeed but GuessMainPID=yes (the default for no
> PIDFile) should work, since qemu-nbd only has one parent process.
Another reason:
I think that the --fork option is mainly intended for command line use
of qemu-nbd. If you're running qemu-nbd from a program there's no
real reason to use --fork, since you can control the fork process
better yourself.
LISTEN_PID isn't settable from the command line. It's also not
settable from a shell script (as far as I can tell when I was trying
to write a shell script to test nbdkit). It has to be set between the
fork and exec calls, because it is set to the qemu-nbd PID.
So I don't think --fork and socket activation are really features that
it makes any sense to mix.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html
next prev parent reply other threads:[~2017-02-03 19:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-03 17:09 [Qemu-devel] [PATCH v3] qemu-nbd: Implement socket activation Richard W.M. Jones
2017-02-03 17:09 ` Richard W.M. Jones
2017-02-03 17:31 ` Paolo Bonzini
2017-02-03 18:56 ` Richard W.M. Jones
2017-02-03 18:58 ` Paolo Bonzini
2017-02-03 19:22 ` Richard W.M. Jones [this message]
2017-02-04 7:44 ` Paolo Bonzini
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=20170203192244.GC13825@redhat.com \
--to=rjones@redhat.com \
--cc=den@openvz.org \
--cc=dplotnikov@virtuozzo.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rkagan@virtuozzo.com \
--cc=stefanha@gmail.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 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.