[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3] qemu-nbd: Implement socket activation.
From: |
Richard W.M. Jones |
Subject: |
Re: [Qemu-devel] [PATCH v3] qemu-nbd: Implement socket activation. |
Date: |
Fri, 3 Feb 2017 18:56:24 +0000 |
User-agent: |
Mutt/1.5.20 (2009-12-10) |
On Fri, Feb 03, 2017 at 09:31:43AM -0800, Paolo Bonzini wrote:
>
>
> On 03/02/2017 09:09, Richard W.M. Jones wrote:
> > + const char *port,
> > + bool fork_process)
> > +{
> > + if (device != NULL) {
> > + return "NBD device can't be set when using socket activation";
> > + }
> > +
> > + if (sockpath != NULL) {
> > + return "Unix socket can't be set when using socket activation";
> > + }
> > +
> > + if (address != NULL) {
> > + return "The interface can't be set when using socket activation";
> > + }
> > +
> > + if (port != NULL) {
> > + return "TCP port number can't be set when using socket activation";
> > + }
> > +
> > + 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.
Rich.
> Apart from this, the patch seems fine.
>
> > + return NULL;
> > +}
>
>
--
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