Re: Readiness notification exemplars

2020-04-09 Thread Jonathan de Boyne Pollard
Brett Neumeier: It's maybe a little heavy-handed, but is there any technical reason not to just pick an arbitrary FD, like say 3, and just always use that for a particular daemon? Further to what M. Bercot said, see https://unix.stackexchange.com/a/331104/5132 .

Re: Readiness notification exemplars

2020-04-08 Thread Laurent Bercot
It's maybe a little heavy-handed, but is there any technical reason not to just pick an arbitrary FD, like say 3, and just always use that for a particular daemon? For a given daemon, no, there's no reason not to pick an arbitrary fd and stick to it. That's the intended usage. For a

Re: Readiness notification exemplars

2020-04-07 Thread Brett Neumeier
On Sat, Apr 4, 2020 at 5:18 PM Serge E. Hallyn wrote: > > On the daemon side, you can use any option you like to tell the daemon > > what fd it should write to. It has nothing to do with s6, and I have no > > recommended policy for daemons. > It's maybe a little heavy-handed, but is there any

Re: Readiness notification exemplars

2020-04-04 Thread Serge E. Hallyn
On Sat, Apr 04, 2020 at 09:29:04PM +, Laurent Bercot wrote: > > > Yes it sounds like I completely misread the earlier emails, sorry about > > that. Now, looking at http://skarnet.org/software/s6/notifywhenup.html, > > I'm probably not reading that quite right, but it seems to tie the > >

Re: Readiness notification exemplars

2020-04-04 Thread Laurent Bercot
Yes it sounds like I completely misread the earlier emails, sorry about that. Now, looking at http://skarnet.org/software/s6/notifywhenup.html, I'm probably not reading that quite right, but it seems to tie the proposal to the 'notifcation-fd' file in the service directory, making it a bit

Re: Readiness notification exemplars

2020-04-04 Thread Serge E. Hallyn
On Fri, Apr 03, 2020 at 07:41:25AM +, Jonathan de Boyne Pollard wrote: > Serge E. Hallyn: > > > If making changes to daemons were going to palatable, [...] > > > > Clearly, it *is* palatable, given that a few people have been adding the > systemd mechanism to their programs for several

Re: Readiness notification exemplars

2020-04-04 Thread Serge E. Hallyn
On Wed, Apr 01, 2020 at 05:13:06PM +, Laurent Bercot wrote: > > > There are pros and cons, but you are arguing for parsing stdout for a > > text message and/or using pidfiles (written to an fd). > > I'm arguing for none of these things. > I'm arguing for daemons to write a newline to a fd

Re: Readiness notification exemplars

2020-04-03 Thread Jonathan de Boyne Pollard
Serge E. Hallyn: If making changes to daemons were going to palatable, [...] Clearly, it *is* palatable, given that a few people have been adding the systemd mechanism to their programs for several years, now. Pierre-Yves Ritschard's code and Cameron Norman's code come straight out of

Re: Readiness notification exemplars

2020-04-01 Thread Laurent Bercot
There are pros and cons, but you are arguing for parsing stdout for a text message and/or using pidfiles (written to an fd). I'm arguing for none of these things. I'm arguing for daemons to write a newline to a fd of their choice, which is hardly anything difficult. And hardly anything

Re: Readiness notification exemplars

2020-04-01 Thread Serge E. Hallyn
On Wed, Apr 01, 2020 at 03:59:25PM +, Laurent Bercot wrote: > > You'd have to buy into it with a syscall that says "let me know when > > something listens on tcp port N". In turn s6-supervise would only do > > that if some config said "don't start service Y until something (which > > is

Re: Readiness notification exemplars

2020-04-01 Thread Laurent Bercot
You'd have to buy into it with a syscall that says "let me know when something listens on tcp port N". In turn s6-supervise would only do that if some config said "don't start service Y until something (which is expected to be service X) proves it's ready by listening on port N". The idea was to

Re: Readiness notification exemplars

2020-04-01 Thread Serge E. Hallyn
On Wed, Apr 01, 2020 at 03:06:49PM +, Laurent Bercot wrote: > > I've been considering for several years trying to push a kernel patch > > which would provide a way for userspace to find out when someone starts > > listening on some port. Based on problems I saw long ago in the late > > days

Re: Readiness notification exemplars

2020-04-01 Thread Laurent Bercot
I've been considering for several years trying to push a kernel patch which would provide a way for userspace to find out when someone starts listening on some port. Based on problems I saw long ago in the late days of upstart and early days of systemd, that seemed like it would solve a not

Re: Readiness notification exemplars

2020-04-01 Thread Laurent Bercot
I am curious, does anyone on this list know of examples of such daemons? I am considering creating and submitting patches for some daemon programs that I use that do *not* support this mechanism as yet, and am curious if it is as simple as it looks like it should be. - I'm trying to make it so

Re: Readiness notification exemplars

2020-04-01 Thread Serge E. Hallyn
I've been considering for several years trying to push a kernel patch which would provide a way for userspace to find out when someone starts listening on some port. Based on problems I saw long ago in the late days of upstart and early days of systemd, that seemed like it would solve a not

Re: Readiness notification exemplars

2020-04-01 Thread Casper Ti. Vector
On Wed, Apr 01, 2020 at 08:23:26AM -0500, Brett Neumeier wrote: > I am curious, does anyone on this list know of examples of such daemons? I > am considering creating and submitting patches for some daemon programs > that I use that do *not* support this mechanism as yet, and am curious if > it is