On 03/09/15 20:23, Laurent Bercot wrote:
On 03/09/2015 18:25, Buck Evan wrote:
An s6-checkhelper wrapper that implements exactly the above would make me
happy enough.

  Yes, that's envisionable. I'll think about it.

I pondered over the problem and came up with the following conclusions:
- Polling is ugly, but useful enough to implement anyways.
- Polling has no place in s6-supervise.
- It's infeasible to implement the s6 readiness protocol in every service.
- The runit ./check scripts polled by sv (the runit equivalent to s6-svc) scale badly for dependency trees with a high fan-out.

Bitching about the limitations of open source software is easy so here is my proposed solution:
- Have one polling daemon.
- A wrapper registers polled services with the polling daemon.
- The wrapper passes the service directory fd (its working directory) and the notification fd to the polling service over a unix domain socket (maybe with a polling frequency and scaling factor). - The polling daemon invokes ./check until it returns an exit successfully or the polled service is brought down.

I'm willing to implement this but I have no experience with the skalibs API and would probably make a mess of it which integrates poorly with the source code of the s6 suite. I would also require some testers for platforms other than FreeBSD.

This solution would offer polling for those accepting the trade-offs and keep the rest of the s6 suite clean.

Reply via email to