Re: External health Check Process

2020-10-22 Thread Steve Litt
On Thu, 22 Oct 2020 15:34:37 +
"Laurent Bercot"  wrote:


>   Hi Oliver,
> 
>   The s6-idiomatic way of doing it would be, as you say, to have a
> separate service that calls an external command (the health checker,
> which is daemon-specific) with a timeout and watches the exit code.
> It is trivial to do in shell, which is why I haven't written any
> particular binary for that.
> 
>   I could add a program that does it for you so you don't have to
> write a 3-line shell script, and a command that creates a s6 service
> directory (or even a s6-rc source definition directory) that watches
> another service using the aforementioned program, it would not be
> hard. However, I am concerned about scope creep, and a common
> criticism I hear from distros is that s6 is "too big" - which is
> unfair considering that integrated init systems providing the same
> level of functionality are 5x-10x bigger, but is really a way of
> saying that there are a lot of exposed binaries with miscellaneous
> functionality and it's difficult to wrap one's head around it. 

Laurent, I agree with you. My main attraction to daemontools, runit and
s6 is they're simple and understandable. There's almost nothing I can't
do with them if I get creative with shellscripts. I understand you
insistence on PID1 supervising the real supervisor: That's worth the
added complexity. I understand your desire to order process
instantiation at boot and to intermix run-once and long-run processes,
think that's worth the added complexity, and in fact this is one of the
few things I missed in daemontools and runit. 

But most of the other suggestions that in my opinion are just answers
to systemd weenie's "but s6 doesn't have _" arguments, and don't
add nearly enough functionality or convenience for the complexity, or
just plain size added to the user manual, to justify.

The OP already stated there's a way to do it currently. Why complexify
s6 to do something already doable?

SteveT

Steve Litt 
Autumn 2020 featured book: Thriving in Tough Times
http://www.troubleshooters.com/thrive


Re: External health Check Process

2020-10-22 Thread Casper Ti. Vector
On Thu, Oct 22, 2020 at 03:34:37PM +, Laurent Bercot wrote:
>  I'm pretty sure that people in the community already have run script
> models for healthchecker services, if they could contribute them it
> would be awesome ;)

Just in case anyone finds this a useful prototype:

Mainly used here as of now:


-- 
My current OpenPGP key:
RSA4096/0x227E8CAAB7AA186C (expires: 2022.09.20)
7077 7781 B859 5166 AE07 0286 227E 8CAA B7AA 186C



Re: External health Check Process

2020-10-22 Thread Laurent Bercot

I know you can model a service in s6, which watches another service and
kills it, so in fact the problem is solved outside of s6. But I wanted
to ask to develop a feature to get a simple way to model that within s6.
Usually it's good enough to call a external command with a timeout and
watches exit code.


 Hi Oliver,

 The s6-idiomatic way of doing it would be, as you say, to have a
separate service that calls an external command (the health checker,
which is daemon-specific) with a timeout and watches the exit code.
It is trivial to do in shell, which is why I haven't written any
particular binary for that.

 I could add a program that does it for you so you don't have to write
a 3-line shell script, and a command that creates a s6 service directory
(or even a s6-rc source definition directory) that watches another
service using the aforementioned program, it would not be hard.
However, I am concerned about scope creep, and a common criticism I
hear from distros is that s6 is "too big" - which is unfair considering
that integrated init systems providing the same level of functionality
are 5x-10x bigger, but is really a way of saying that there are a lot of
exposed binaries with miscellaneous functionality and it's difficult to
wrap one's head around it. So I'm trying not to add to the problem, and
the direction I'm going these days is more towards integration and
high-level management than towards adding building blocks to help with
various tasks, so if something is doable with a bit of scripting, then
I'd rather let users do it that way.

 I'm pretty sure that people in the community already have run script
models for healthchecker services, if they could contribute them it
would be awesome ;)

--
 Laurent



External health Check Process

2020-10-22 Thread Oliver Schad
Hi everybody,

we have cases, where processes are still there, but doesn't work
anymore. This is a common problem with runtime environments like java
or golang, where the memory management might have problems and internal
routines doesn't work anymore. That is really a common problem in that
area (heap too small, too frequently garbage collection, ...)

I know you can model a service in s6, which watches another service and
kills it, so in fact the problem is solved outside of s6. But I wanted
to ask to develop a feature to get a simple way to model that within s6.
Usually it's good enough to call a external command with a timeout and
watches exit code.

Yes, that means polling but in a datacenter is a polling health check
not a big energy problem.

Is that something, you can imagine in the future, supporting an
external health check?

Best Regards
Oli

-- 
Automatic-Server AG •
Oliver Schad
Geschäftsführer
Turnerstrasse 2
9000 St. Gallen | Schweiz

www.automatic-server.com | oliver.sc...@automatic-server.com
Tel: +41 71 511 31 11 | Mobile: +41 76 330 03 47


pgp4Uwj7eiJgh.pgp
Description: OpenPGP digital signature