Re: [PATCH] daemons: write pid file even when told not to daemonize

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

 




On 29/08/2014 08:41, Alexandre Oliva wrote:
> On Aug 28, 2014, Loic Dachary <loic@xxxxxxxxxxx> wrote:
> 
>> Changing this behavior is not backward compatible but it is indeed more intuitive. Has it been a significant inconvenience so far ?
> 
> Before I wrote the patch, it was very inconvenient: in order to stop
> ceph services, I had to dig up the PIDs from ps output and then kill the
> processes manually, and I had to run ceph without my monitor that
> automatically restarted services that died (checking that the pid file
> was absent, or that the PID it named was not a running process).
> 
> After I applied the patch in my local build, I could just forget about
> the earlier problems, and none surfaced because of the creation of the
> PID file.
> 
> Is this what you were asking?

Hi Alexandre,

After a quick glance at the systemd man page http://www.freedesktop.org/software/systemd/man/systemd.service.html#Options it seems possible to do something like

    https://github.com/dachary/ceph/compare/wip-systemd?expand=1

Alternatively, shouldn't systemctl kill ceph-osd@10.service be the canonical way of killing a process spawned by systemd ?

If both are impractical or frowned upon for some reason, it looks like your patch is the only way to go, indeed.

Cheers

> 
>> On 28/08/2014 09:35, Alexandre Oliva wrote:
>>> On Jul 31, 2014, Sage Weil <sweil@xxxxxxxxxx> wrote:
>>>
>>>> On Thu, 31 Jul 2014, Loic Dachary wrote:
>>>>> Hi Alexandre,
>>>>>
>>>>> With this patch ceph-osd -f will try to create the default pid file : 
>>>>> this is a non backward compatible change. Maybe there is a way for 
>>>>> systemd to capture the pid of the process and store it instead of 
>>>>> requiring the deamon to create the pid file ?
>>>
>>>> Do we need the pid file at all when we aren't using sysinit?
>>>
>>> My own monitoring scripts use it, and ceph stop use it as well.  I was
>>> surprised we were not creating them in spite of an explicit command line
>>> option to do so.
> 

-- 
Loïc Dachary, Artisan Logiciel Libre

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux