Re: Using runit-init on debian/Jessie in place of sysvinit/systemd

2015-01-02 Thread Avery Payne
On Fri, Jan 2, 2015 at 6:51 AM, Luke Diamand l...@diamand.org wrote:

 On 02/01/15 10:40, Avery Payne wrote:

 On Thu, Jan 1, 2015 at 3:39 PM, Luke Diamand l...@diamand.org wrote:

 Caution, a shameless plug follows:

 If you are willing to share the contents of your scripts with a very
 permissive license, I would like to see them and possibly incorporate the
 ideas into my current project.


 https://github.com/luked99/supervision-scripts


Thanks!  I'll incorporate them as soon as possible, although a pull request
would work too. :)


 The instructions should just tell you to install the debian package
 (runit-initscripts ?). Is that possible? I might be able to write such a
 package if it was the right way to go.

While the scripts received their start in life from runit, they are now
meant to be framework-agnostic, supporting daemontools and s6 as well.
That is why I changed the name to supervision-scripts, although you could
make a virtual package runit-scripts that pulls supervision-scripts I
suppose.



 Sorry, I didn't record the errors at the time (I assumed it was just
 user-error on my part). runit is 2.1.2-3.

I'm on runit 2.1.1-6.2 at the moment.  Perhaps a change caused the issue?
Gerrit is probably lurking around the mailing list somewhere.


 That's quite a hard problem to solve...!

Indeed.  To make things worse, I think/guess the reason Gerrit didn't make
the package install runit-init as default, is because of the sudden
transition without any scripts in place.  Too many things depending on SysV
would break, including a working console to fix things (remember, there is
no inittab to spawn a getty), and now with the transition to systemd it
would be all kinds of messy.  I believe in Jessie (aka Debian 8) there is
a sysv-core(?) package that, along with systemd-shim, would continue to
make transitioning to runit easier by adhering to the old SysV method.
Nevermind that SysV is ignorant of /sbin/init and overwrites it when it
updates, killing runit-init in the process.  After becoming tired of doing
mv init init.sysv; ln -s runit.init init many times, I now edit the linux
kernel parameters at startup with init=/sbin/runit-init and make sure I
use init 6 to shut down, allowing both systems to be present.

Perhaps Gerrit could change the existing package to do the following:

+ Address the issue of /service vs. /etc/service via ln -s /etc/service
/service, although this may be an issue with Debian's use of the FHS,
which I think forbids adding things in /, but I'm not sure.  At least with
the symlink, removal of the package would remove just /service but keep
/etc/service intact, preserving your choices.  This would help resolve some
of the instruction issues on the webpage.
+ Put in a requires sysv-core and systemd-shim for Jessie.  Trying to
accomodate systemd while Jessie transitions would be too much trouble I
think; that could be addressed in Debian 9, when SysV is scheduled to go
away completely.
+ Allow /etc/runit to be created and populated.  Hunting down the
installation files in /usr/share/doc/runit/debian isn't what I was
expecting.  The instructions for installation are probably meant to be
fairly cross-platform, so you can understand what is involved (and
therefore, what you need to do to recover in an emergency).  They can be
kept as-is with a simple addition, If you are running Debian, the
/etc/runit directory has been created for you already, and you can go to
step blah-blah next.  Otherwise, the following steps need to be taken...


Re: Using runit-init on debian/Jessie in place of sysvinit/systemd

2015-01-02 Thread toki clover
Feel free to take meds and re-invent the wheel when you feel like it.
No problem of course.

Take care.

-- Forwarded message --
From: Avery Payne avery.p.pa...@gmail.com
Date: 2015-01-02 11:54 GMT+01:00
Subject: Re: Using runit-init on debian/Jessie in place of sysvinit/systemd
To: toki clover tokiclo...@gmail.com



On Thu, Jan 1, 2015 at 4:31 PM, toki clover tokiclo...@gmail.com wrote:

 -- Forwarded message --
 From: toki clover tokiclo...@gmail.com
 Date: 2015-01-02 1:30 GMT+01:00
 Subject: Re: Using runit-init on debian/Jessie in place of sysvinit/systemd
 To: Luke Diamand l...@diamand.org


 First, it's a bit crazy to use runit for init+service management entirely
 because:


Oh, I'm crazy? Perhaps I should put on Mad Scientist goggles and a lab
coat? :-)



 - It's completely crazy to supervise every service because; first, every
 service
 won't fit in if it's not a daemon;


I'm working on this issue.  This may be achievable with just shell script
alone; but I'm looking at something very different from other solutions.


 second supervising every daemon is
 dangerous.


How?  In what context?  I'm curious.


 - Second, runit (or s6 for that matter) lack any decent service dependency,
 actually both completely ignore the problem (athough s6 may change this in
 in a near futur.)


I have been working on a shell-script prototype that would bring up
services before launching a daemon.  It is not complete and I am still
working out the details.  If it works, then I will include it as a
standard feature of supervision-scripts.


 - Third, do not forget the overhead of supervision (an extra instance per
 daemon.)


There was some discussion on the mailing list about this very topic.


 Stuffing stage 1 is suicidal...


It's only suicidal if you don't have another init system around.  I kept
chunks of SysV intact on my home system for that reason, but it defaults to
and starts with runit currently.  Since the switch over, I've not needed
SysV beyond looking at what Debian currently does inside of init.d scripts.




-- 
Error 404: gentoo user 0123456789 was not found


Re: Using runit-init on debian/Jessie in place of sysvinit/systemd

2015-01-01 Thread toki clover
Naturally, you just need to append `init=/sbin/runit-init' (check the path
beforehand)
to use runit-init as PID 1 (to replace `init=/sbin/init' or
`init=/usr/lib/systemd'.)