option to wait for pid file to appear

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

 



On Do, 17.05.18 22:54, Igor Bukanov (igor at mir2.org) wrote:

> On 17 May 2018 at 19:23, Lennart Poettering <lennart at poettering.net> wrote:
> 
> > So yes, this is a bug in nginx. They really should fix that. And this
> > is not only broken when you use systemd, but on sysvinit too, as a
> > command like this would likely fail there too: "service nginx start
> > service nginx status", as the start would return before the PID file
> > is written, and then status would claim the service to be down...
> 
> Given that systemd deals with this situation in a very reasonable way,
> nginx must not be alone in doing this. And if this a common way to
> write such code, perhaps it should not be considered a bug but rather
> one more peculiarity of application services the service manager
> should deal....

Well, no. The protocol is clear, and what we do is pretty close to
black magic, and still racy in many ways.

I mean, broken behaviour is still broken behaviour, even if we
nowadays handle it pretty nicely. Really, nginx should be fixed,
everybody benefits, sysvinit as much as we do.

Or, to turn this around: if nginx is happy that all only works
somewhat reliably on systemd systems, then they might as well just do
this properly, and rework this to Type=notify. Because right now,
systemd can deal with the broken behaviour, but *only* systemd really
can, and this will trip up on other systems, such as sysvinit or
upstart.

Lennart

-- 
Lennart Poettering, Red Hat


[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux