qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3] qemu-nbd: Implement socket activation.


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v3] qemu-nbd: Implement socket activation.
Date: Fri, 3 Feb 2017 10:58:15 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1


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:
>>> +                                                   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.

PIDFile is recommended indeed but GuessMainPID=yes (the default for no
PIDFile) should work, since qemu-nbd only has one parent process.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]