Re: [gentoo-dev] rfc: supervise-daemon -- a lightweight openrc daemon supervisor

2016-02-16 Thread James Le Cuirot
On Tue, 16 Feb 2016 16:04:42 -0600
William Hubbs  wrote:

> > I wonder if it might even make more sense to reuse one of these
> > instead of reinventing the wheel. They are both extremely
> > lightweight. If you feel you can do better though then go for it!  
> 
> We have s6 support in OpenRC, and I am looking at integrating runit
> support as well.
> 
> For s6 info, see the s6-guide.md file located in
> /usr/share/doc/openrc-*.

Oh, that's cool! Now I come to think of it, I believe it was this
effort that made me aware of s6 in the first place but I'd forgotten
about it since. Now I feel dumb. As you were then. You're doing
great work and we're clearly spoilt for choice. :)

-- 
James Le Cuirot (chewi)
Gentoo Linux Developer


pgpq_TKG59Wui.pgp
Description: OpenPGP digital signature


Re: [gentoo-dev] rfc: supervise-daemon -- a lightweight openrc daemon supervisor

2016-02-16 Thread William Hubbs
On Tue, Feb 16, 2016 at 07:32:08PM +, James Le Cuirot wrote:
> On Tue, 16 Feb 2016 12:51:17 -0600
> William Hubbs  wrote:
> 
> > there is a branch in the OpenRC github repo called supervisor.
> 
> Interesting!
> 
> > It is still very rough, and not ready for production, but at this
> > point I would like to make everyone aware that it exists and  ask
> > folks to go over the code and provide comments.
> 
> I'm not really qualified to comment on the code but I'm aware that
> there are lot of ways to get this wrong so please do your homework if
> you haven't done so already. Your post seems like a good start. :)
 
That's exactly why I posted it; I know this is a complex issue, so I
want others to look over the code and provide suggestions for cleaning
it up before it goes mainline.

> runit seems highly regarded and we use it at work on CentOS to allow
> users of the same UNIX group to manage a collection of processes
> without requiring root or sudo. I wasn't aware of s6 at the time but
> I've heard that's also good and this makes an interesting read.
> 
> http://skarnet.org/software/s6/why.html
> 
> I wonder if it might even make more sense to reuse one of these instead
> of reinventing the wheel. They are both extremely lightweight. If you
> feel you can do better though then go for it!

We have s6 support in OpenRC, and I am looking at integrating runit
support as well.

For s6 info, see the s6-guide.md file located in
/usr/share/doc/openrc-*.

This is experimental work at this point, because I've been asked to
determine how much work would be involved in having a small light-weight
supervisor in OpenRC directly.

> Regards,
> -- 
> James Le Cuirot (chewi)
> Gentoo Linux Developer

William



signature.asc
Description: Digital signature


Re: [gentoo-dev] rfc: supervise-daemon -- a lightweight openrc daemon supervisor

2016-02-16 Thread James Le Cuirot
On Tue, 16 Feb 2016 12:51:17 -0600
William Hubbs  wrote:

> there is a branch in the OpenRC github repo called supervisor.

Interesting!

> It is still very rough, and not ready for production, but at this
> point I would like to make everyone aware that it exists and  ask
> folks to go over the code and provide comments.

I'm not really qualified to comment on the code but I'm aware that
there are lot of ways to get this wrong so please do your homework if
you haven't done so already. Your post seems like a good start. :)

runit seems highly regarded and we use it at work on CentOS to allow
users of the same UNIX group to manage a collection of processes
without requiring root or sudo. I wasn't aware of s6 at the time but
I've heard that's also good and this makes an interesting read.

http://skarnet.org/software/s6/why.html

I wonder if it might even make more sense to reuse one of these instead
of reinventing the wheel. They are both extremely lightweight. If you
feel you can do better though then go for it!

Regards,
-- 
James Le Cuirot (chewi)
Gentoo Linux Developer


pgp9qOD_XNjkz.pgp
Description: OpenPGP digital signature


[gentoo-dev] rfc: supervise-daemon -- a lightweight openrc daemon supervisor

2016-02-16 Thread William Hubbs
All,

there is a branch in the OpenRC github repo called supervisor.

On that branch, I am working on a lightweight daemon supervisor that
will be native to OpenRC.

It is based on start-stop-daemon, but it will stay around and make sure
that the daemon gets restarted if it dies.

It is still very rough, and not ready for production, but at this point
I would like to make everyone aware that it exists and  ask folks to go
over the code and provide comments.

It can currently launch a daemon, and I still am working on making it
restart a daemon if it dies.

This will only work for non-forking daemons; the daemon should not fork
and should not write a pid file.

One of the big questions I have is about PAM usage. Do I still need to
do that in this supervisor? If I open a PAM session, does it carry
across forks?

Thanks,

William



signature.asc
Description: Digital signature