supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* Re: runit on debian sid success, and questions
@ 2005-01-19  6:12 Larry Doolittle
  2005-01-19 21:07 ` Thomas Schwinge
  2005-01-20 22:55 ` Vincent Danen
  0 siblings, 2 replies; 13+ messages in thread
From: Larry Doolittle @ 2005-01-19  6:12 UTC (permalink / raw)


[trimmed copy of private e-mail]

On Tue, Jan 18, 2005 at 08:38:31PM -0500, Dean Hall wrote:
> How did you get rid of portmap? Did you get rid of the services for
> which it's required? Or did you force them to use a static port?

rm /etc/rcS.d/S18portmap; sh /etc/init.d/portmap stop
I don't have any services that require portmap.

> You might check out uschedule <http://www.ohse.de/uwe/uschedule.html>.
> It's a decent and simple cron and at replacement.

Thanks for the link!  I think I'll keep my script for now, but
that program looks better than cron if I'm forced to use something
more complex.  Right now all I need is something to run the daily
maintenance for man, locate, and TeX.

> | It was quite a trick
> | to shut down the machine the first time after that install!
> 
> Yeah, you have to use the sysv init executable to shut down the machine
> the first time. *shrug*

Right, but the list of familiar things that don't work (cntrl-alt-del, 
reboot, shutdown -h now, telinit 0) is much longer than what does work.

      - Larry


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: runit on debian sid success, and questions
  2005-01-19  6:12 runit on debian sid success, and questions Larry Doolittle
@ 2005-01-19 21:07 ` Thomas Schwinge
  2005-01-19 21:53   ` Larry Doolittle
  2005-01-20 22:55 ` Vincent Danen
  1 sibling, 1 reply; 13+ messages in thread
From: Thomas Schwinge @ 2005-01-19 21:07 UTC (permalink / raw)
  Cc: supervision

On Tue, Jan 18, 2005 at 10:12:02PM -0800, Larry Doolittle wrote:
> > | It was quite a trick
> > | to shut down the machine the first time after that install!
> > 
> > Yeah, you have to use the sysv init executable to shut down the machine
> > the first time. *shrug*
> 
> Right, but the list of familiar things that don't work (cntrl-alt-del, 
> reboot, shutdown -h now, telinit 0) is much longer than what does work.

Of course, when you change the tools, you have to learn how to use the
new ones.

/etc/runit/ctrlaltdel
runit-init { 0 | 6 }
...

It's all written in the documentation.


Regards,
 Thomas


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: runit on debian sid success, and questions
  2005-01-19 21:07 ` Thomas Schwinge
@ 2005-01-19 21:53   ` Larry Doolittle
  0 siblings, 0 replies; 13+ messages in thread
From: Larry Doolittle @ 2005-01-19 21:53 UTC (permalink / raw)
  Cc: Thomas Schwinge

Thomas -

On Wed, Jan 19, 2005 at 10:07:28PM +0100, Thomas Schwinge wrote:
> On Tue, Jan 18, 2005 at 10:12:02PM -0800, Larry Doolittle wrote:
> > > | It was quite a trick
> > > | to shut down the machine the first time after that install!
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
... when the machine is still running on SysV-init.

> > > Yeah, you have to use the sysv init executable to shut down the machine
> > > the first time. *shrug*
> > 
> > Right, but the list of familiar things that don't work (cntrl-alt-del, 
> > reboot, shutdown -h now, telinit 0) is much longer than what does work.
> 
> Of course, when you change the tools, you have to learn how to use the
> new ones.
> 
> /etc/runit/ctrlaltdel
> runit-init { 0 | 6 }
> ...
> 
> It's all written in the documentation.

That only applies _after_ runit has control.  That first time is
weird, and I hadn't appreciated how weird, until I actually sat
at the keyboard and tried to shut down.  SysV init is running,
but all the symlinks in the file system point away from the
SysV init-related executables.  To find myself, I ended up typing
   ls -l /sbin | grep init
That helped a lot!

       - Larry


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: runit on debian sid success, and questions
  2005-01-19  6:12 runit on debian sid success, and questions Larry Doolittle
  2005-01-19 21:07 ` Thomas Schwinge
@ 2005-01-20 22:55 ` Vincent Danen
  1 sibling, 0 replies; 13+ messages in thread
From: Vincent Danen @ 2005-01-20 22:55 UTC (permalink / raw)
  Cc: supervision

[-- Attachment #1: Type: text/plain, Size: 1234 bytes --]


On Jan 18, 2005, at 23:12, Larry Doolittle wrote:

> [trimmed copy of private e-mail]
>
> On Tue, Jan 18, 2005 at 08:38:31PM -0500, Dean Hall wrote:
>> How did you get rid of portmap? Did you get rid of the services for
>> which it's required? Or did you force them to use a static port?
>
> rm /etc/rcS.d/S18portmap; sh /etc/init.d/portmap stop
> I don't have any services that require portmap.
>
>> You might check out uschedule <http://www.ohse.de/uwe/uschedule.html>.
>> It's a decent and simple cron and at replacement.
>
> Thanks for the link!  I think I'll keep my script for now, but
> that program looks better than cron if I'm forced to use something
> more complex.  Right now all I need is something to run the daily
> maintenance for man, locate, and TeX.

Another option is dcron, which I'm happily using supervised.  The link 
should be:

http://apollo.backplane.com/FreeSrc/

And my runscript is:

[vdanen@dionysus SPECS]$ cat /service/crond/run
#!/bin/sh

# this runs crond supervised

exec /usr/sbin/crond -f 2>&1

Fairly straightforward.

-- 
Annvix - Secure Linux Server: http://annvix.org/
"lynx -source http://linsec.ca/vdanen.asc | gpg --import"
{FEE30AD4 : 7F6C A60C 06C2 4811 FA1C  A2BC 2EBC 5E32 FEE3 0AD4}

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 186 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: runit on debian sid success, and questions
  2005-01-19  1:13 Larry Doolittle
                   ` (2 preceding siblings ...)
  2005-01-19  6:39 ` Dean Hall
@ 2005-01-23 12:23 ` Gerrit Pape
  3 siblings, 0 replies; 13+ messages in thread
From: Gerrit Pape @ 2005-01-23 12:23 UTC (permalink / raw)


On Tue, Jan 18, 2005 at 05:13:03PM -0800, Larry Doolittle wrote:
> For that installation, I simply used "apt-get install runit-init"
> once I had the basics tested under runit.  It was quite a trick
> to shut down the machine the first time after that install!
> Something like "/sbin/sysv-init 0" finally did it; telint was
> linked to runit-init, which of course didn't know how to shut
> down the system running under the old paradigm.  I think I saw
> a message giving hints about this as part of the apt-get, but
> I blew it off a little too lightly.

Yes, you really should've read the message prompted when installing the
runit-run package.  It tells you to use /sbin/init.sysv 6 ;-).
/usr/share/doc/runit-run/README.Debian also tells you that, not sure how
to document it more prominently.

Regards, Gerrit.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: runit on debian sid success, and questions
  2005-01-19  6:08 ` Larry Doolittle
@ 2005-01-19 21:09   ` Thomas Schwinge
  0 siblings, 0 replies; 13+ messages in thread
From: Thomas Schwinge @ 2005-01-19 21:09 UTC (permalink / raw)
  Cc: supervision

On Tue, Jan 18, 2005 at 10:07:44PM -0800, Larry Doolittle wrote:
> On Tue, Jan 18, 2005 at 05:13:03PM -0800, Larry Doolittle wrote:
> > 
> > I ran into odd runit shutdown behavior on another machine,
> > vanilla Pentium (Celeron) with Debian sarge.  I don't have
> > the exact message, but it said something like
> > 
> >    power down
> >    kernel panic, attempting to kill init!
> > 
> > then the disks spun down, but the video kept going.
> > It then needed me to reset or power down.  Of course, this
> > machine powered down normally with stock debian sarge init.
> 
> OK, I lied.  It powered down normally with Red Hat 7.3, but there
> is a similar lack-of-power-down with stock debian sarge init.
> Still, there is an extra wrinkle with ruinit.
> 
> Transcript (by hand, I tried to avoid any errors):
> 
> ...normal shutdown stuff...
> - runit: power off
> flushing ide devices: hda hdc
> Power down.
> Kernel panic: Attempted to kill init!
> 
> <whine as disk spins down>
> <caps log & scroll lock LEDs start blinking with one second period>
> <power stays on, screen is still there, and reacts to ALT-Fn>

#v+
[...]
From: Gerrit Pape <pape@smarden.org>
To: supervision@list.skarnet.org
Subject: Re: Shutdown kernel panic
[...]

On Mon, Feb 02, 2004 at 09:27:17PM -0800, Anthony Gorecki wrote:
> Using RunIt on kernel 2.6.1, I receive the following output at the end of 
> executing init 0:
> 
> - - runit: leave stage: /etc/runit/3
> - - runit: sending KILL signal to all processes...
> - - runit: power off...
> Power down.
> Kernel panic: Attempted to kill init!

I've seen this too with older Linux kernels.  I guess it depends on the
kernel configuration.  It shouldn't hurt much, at this time everything
is ready for power off.
[...]
#v-

#v+
[...]
From: yoppo@jippii.fi
To: supervision@list.skarnet.org
Subject: about runit...
[...]

Hi!

First I must say that I started using runit about month ago and I must=20
say I am pretty pleased with it. Now I think I found small bug in it.=20
When acpi is disabled (acpi=3Doff at lilo append) I got kernel panic at=20
end of the shutdown/reboot process:

....
-runit: power off...
Power down.
Kernel panic: Attempted to kill init!

Off course this actually doesn't matter much but I think it should cause=20
this when acpi disabled.
[...]
#v-

> The only extra stuff here is the "Kernel panic: Attempted to kill init!"
> message.  Does sysv.init spin in an idle loop if the power down fails?

At a _quick_ glance it doesn't seem to.
sysvinit-2.85, halt.c
#v+
[...]
        if (do_hddown)
                (void)hddown();

        if (do_reboot) {
                init_reboot(BMAGIC_REBOOT);
        } else {
                /*
                 *      Turn on hard reboot, CTRL-ALT-DEL will reboot now
                 */
                init_reboot(BMAGIC_HARD);

                /*
                 *      Stop init; it is insensitive to the signals sent
                 *      by the kernel.
                 */
                kill(1, SIGTSTP);

                /*
                 *      Halt or poweroff.
                 */
                if (do_poweroff)
                        init_reboot(BMAGIC_POWEROFF);
                /*
                 *      Fallthrough if failed.
                 */
                init_reboot(BMAGIC_HALT);
        }

        /*
         *      If we return, we (c)ontinued from the kernel monitor.
         */
        init_reboot(BMAGIC_SOFT);
        kill(1, SIGCONT);

        exit(0);
}
#v-


Regards,
 Thomas


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: runit on debian sid success, and questions
  2005-01-19  3:59 ` Dean Hall
@ 2005-01-19 10:03   ` Milan P. Stanic
  0 siblings, 0 replies; 13+ messages in thread
From: Milan P. Stanic @ 2005-01-19 10:03 UTC (permalink / raw)


On Tue, Jan 18, 2005 at 10:59:25PM -0500, Dean Hall wrote:
> You might check out uschedule <http://www.ohse.de/uwe/uschedule.html>.
> It's a decent and simple cron and at replacement.

I packaged it for Debian (woody) and I'm using it on production
servers for some time (more than six months). So, if anyone want to
use it 'out of box' I can upload it somewhere.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: runit on debian sid success, and questions
  2005-01-19  1:13 Larry Doolittle
  2005-01-19  3:59 ` Dean Hall
  2005-01-19  6:08 ` Larry Doolittle
@ 2005-01-19  6:39 ` Dean Hall
  2005-01-23 12:23 ` Gerrit Pape
  3 siblings, 0 replies; 13+ messages in thread
From: Dean Hall @ 2005-01-19  6:39 UTC (permalink / raw)


 > My problem is not so much putting these daemons under runit,
 > it's getting them _out_ of SysV init.  In the case of cron
 > and portmap, I ended up simply getting rid of them.

How did you get rid of portmap? Did you get rid of the services for
which it's required? Or did you force them to use a static port?

 > I can post my norc (antithesis of cron) script if anyone
 > is interested.  It's a ten-line shell script that runs
 > the scripts in /etc/cron.daily at three in the morning,
 > using sleep and date.

You might check out uschedule <http://www.ohse.de/uwe/uschedule.html>.
It's a decent and simple cron and at replacement.

 > I just noticed the ipsvd package yesterday, which is an
 > apt-get away.  Whee!  I have started to phase out tcpserver.

For gentoo users out there, I've submitted an ebuild for ipsvd. Right
now it's only available at the bug post:
<http://bugs.gentoo.org/show_bug.cgi?id=76522>.

 > I ran into odd runit shutdown behavior on another machine,
 > vanilla Pentium (Celeron) with Debian sarge.  I don't have
 > the exact message, but it said something like
 >
 >    power down
 >    kernel panic, attempting to kill init!

I got that message too while running runit with Debian (custom install,
not apt-get). I never really researched it, as I knew I'd be switching
to Debian soon--and I haven't converted over to a runit init scheme yet.

 > It was quite a trick
 > to shut down the machine the first time after that install!
 > Something like "/sbin/sysv-init 0" finally did it; telint was
 > linked to runit-init, which of course didn't know how to shut
 > down the system running under the old paradigm.

Yeah, you have to use the sysv init executable to shut down the machine
the first time. *shrug*


d


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: runit on debian sid success, and questions
  2005-01-19  1:13 Larry Doolittle
  2005-01-19  3:59 ` Dean Hall
@ 2005-01-19  6:08 ` Larry Doolittle
  2005-01-19 21:09   ` Thomas Schwinge
  2005-01-19  6:39 ` Dean Hall
  2005-01-23 12:23 ` Gerrit Pape
  3 siblings, 1 reply; 13+ messages in thread
From: Larry Doolittle @ 2005-01-19  6:08 UTC (permalink / raw)


On Tue, Jan 18, 2005 at 05:13:03PM -0800, Larry Doolittle wrote:
> 
> I ran into odd runit shutdown behavior on another machine,
> vanilla Pentium (Celeron) with Debian sarge.  I don't have
> the exact message, but it said something like
> 
>    power down
>    kernel panic, attempting to kill init!
> 
> then the disks spun down, but the video kept going.
> It then needed me to reset or power down.  Of course, this
> machine powered down normally with stock debian sarge init.

OK, I lied.  It powered down normally with Red Hat 7.3, but there
is a similar lack-of-power-down with stock debian sarge init.
Still, there is an extra wrinkle with ruinit.

Transcript (by hand, I tried to avoid any errors):

...normal shutdown stuff...
- runit: power off
flushing ide devices: hda hdc
Power down.
Kernel panic: Attempted to kill init!

<whine as disk spins down>
<caps log & scroll lock LEDs start blinking with one second period>
<power stays on, screen is still there, and reacts to ALT-Fn>

The only extra stuff here is the "Kernel panic: Attempted to kill init!"
message.  Does sysv.init spin in an idle loop if the power down fails?

I'll try some other things, like Knoppix and Google, to see if I can
isolate the problem powering down.  It's off-topic for this list.
(Although if anybody reading this wants to send me a hint, I'll take it.)

     - Larry


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: runit on debian sid success, and questions
  2005-01-19  1:13 Larry Doolittle
@ 2005-01-19  3:59 ` Dean Hall
  2005-01-19 10:03   ` Milan P. Stanic
  2005-01-19  6:08 ` Larry Doolittle
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 13+ messages in thread
From: Dean Hall @ 2005-01-19  3:59 UTC (permalink / raw)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

| My problem is not so much putting these daemons under runit,
| it's getting them _out_ of SysV init.  In the case of cron
| and portmap, I ended up simply getting rid of them.

How did you get rid of portmap? Did you get rid of the services for
which it's required? Or did you force them to use a static port?

| I can post my norc (antithesis of cron) script if anyone
| is interested.  It's a ten-line shell script that runs
| the scripts in /etc/cron.daily at three in the morning,
| using sleep and date.

You might check out uschedule <http://www.ohse.de/uwe/uschedule.html>.
It's a decent and simple cron and at replacement.

| I just noticed the ipsvd package yesterday, which is an
| apt-get away.  Whee!  I have started to phase out tcpserver.

For gentoo users out there, I've submitted an ebuild for ipsvd. Right
now it's only available at the bug post:
<http://bugs.gentoo.org/show_bug.cgi?id=76522>.

| I ran into odd runit shutdown behavior on another machine,
| vanilla Pentium (Celeron) with Debian sarge.  I don't have
| the exact message, but it said something like
|
|    power down
|    kernel panic, attempting to kill init!

I got that message too while running runit with Debian (custom install,
not apt-get). I never really researched it, as I knew I'd be switching
to Debian soon--and I haven't converted over to a runit init scheme yet.

| It was quite a trick
| to shut down the machine the first time after that install!
| Something like "/sbin/sysv-init 0" finally did it; telint was
| linked to runit-init, which of course didn't know how to shut
| down the system running under the old paradigm.

Yeah, you have to use the sysv init executable to shut down the machine
the first time. *shrug*


d
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFB7dscY5YOge8zySQRAuVHAKCeKdco5hi4/hAtikTzj5ZD3RSSmwCeMr9K
wqB1xykVvYlOqdzBeuQHrXw=
=za/0
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: runit on debian sid success, and questions
@ 2005-01-19  1:13 Larry Doolittle
  2005-01-19  3:59 ` Dean Hall
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Larry Doolittle @ 2005-01-19  1:13 UTC (permalink / raw)


> > The only (non-kernel) daemons left running _not_ under runsvdir
> > are udevd, portmap, and gconfd-2.  Vixie cron and I aren't getting
> > along very well at the moment, it's not running at all.  :-p
> 
> See here for examples for portmap and Debian's cron:

My problem is not so much putting these daemons under runit,
it's getting them _out_ of SysV init.  In the case of cron
and portmap, I ended up simply getting rid of them.

I can post my norc (antithesis of cron) script if anyone
is interested.  It's a ten-line shell script that runs
the scripts in /etc/cron.daily at three in the morning,
using sleep and date.

I just noticed the ipsvd package yesterday, which is an
apt-get away.  Whee!  I have started to phase out tcpserver.

I ran into odd runit shutdown behavior on another machine,
vanilla Pentium (Celeron) with Debian sarge.  I don't have
the exact message, but it said something like

   power down
   kernel panic, attempting to kill init!

then the disks spun down, but the video kept going.
It then needed me to reset or power down.  Of course, this
machine powered down normally with stock debian sarge init.

For that installation, I simply used "apt-get install runit-init"
once I had the basics tested under runit.  It was quite a trick
to shut down the machine the first time after that install!
Something like "/sbin/sysv-init 0" finally did it; telint was
linked to runit-init, which of course didn't know how to shut
down the system running under the old paradigm.  I think I saw
a message giving hints about this as part of the apt-get, but
I blew it off a little too lightly.

    - Larry


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: runit on debian sid success, and questions
  2005-01-14 20:08 Larry Doolittle
@ 2005-01-15 16:07 ` Gerrit Pape
  0 siblings, 0 replies; 13+ messages in thread
From: Gerrit Pape @ 2005-01-15 16:07 UTC (permalink / raw)


On Fri, Jan 14, 2005 at 12:08:29PM -0800, Larry Doolittle wrote:
> I have my debian sid amd64 system converted to runit-1.05.
Good ;-).

> I'm not done setting everything up, but at the moment my
> system is running about as well as it did before the change.
> 
> $ ls /var/service
> boa  getty-5  getty-6  klogd  ntpclient  qmail  socklog  sshd  xfs
> $
> 
> The only (non-kernel) daemons left running _not_ under runsvdir
> are udevd, portmap, and gconfd-2.  Vixie cron and I aren't getting
> along very well at the moment, it's not running at all.  :-p

See here for examples for portmap and Debian's cron:
 http://smarden.org/runit/runscripts.html#portmap
 http://smarden.org/runit/runscripts.html#cron

> Here are my questions (so far) about runit and friends:
> 
> In the debian kit, most static files are in /etc/runit,
> while dynamic files are in /var.  A forest of symlinks
> connects the two "databases".  One exception to that rule
> is the log configuration file, in /var/log/foo/config.
> Is this purposeful and/or unavoidable?

Since the filename always is ``config'' it must be associated with the
log directory, but you can of course make it a symlink if you like.

> The process of setting up service directories is tedious.
> It's a little late for me, but I can imagine automating some
> of the creation and maintenance process.  Maybe even (gasp)
> a GUI.  Are you aware of any efforts in this direction?

No, but if anyone goes for it, I would be interested.

Regards, Gerrit.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* runit on debian sid success, and questions
@ 2005-01-14 20:08 Larry Doolittle
  2005-01-15 16:07 ` Gerrit Pape
  0 siblings, 1 reply; 13+ messages in thread
From: Larry Doolittle @ 2005-01-14 20:08 UTC (permalink / raw)


Gerrit -

I have my debian sid amd64 system converted to runit-1.05.
The stock init scripts are totally out of control, IMNSHO.
I'd even like to rework the rcS (one-time) scripts, but
by running /etc/init.d/rcS from /etc/runit/1 I can postpone
that effort.

I'm not done setting everything up, but at the moment my
system is running about as well as it did before the change.

$ ls /var/service
boa  getty-5  getty-6  klogd  ntpclient  qmail  socklog  sshd  xfs
$

The only (non-kernel) daemons left running _not_ under runsvdir
are udevd, portmap, and gconfd-2.  Vixie cron and I aren't getting
along very well at the moment, it's not running at all.  :-p

Here are my questions (so far) about runit and friends:

In the debian kit, most static files are in /etc/runit,
while dynamic files are in /var.  A forest of symlinks
connects the two "databases".  One exception to that rule
is the log configuration file, in /var/log/foo/config.
Is this purposeful and/or unavoidable?

The process of setting up service directories is tedious.
It's a little late for me, but I can imagine automating some
of the creation and maintenance process.  Maybe even (gasp)
a GUI.  Are you aware of any efforts in this direction?

Thanks for freeing me from SysV-init!

      - Larry


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2005-01-23 12:23 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-19  6:12 runit on debian sid success, and questions Larry Doolittle
2005-01-19 21:07 ` Thomas Schwinge
2005-01-19 21:53   ` Larry Doolittle
2005-01-20 22:55 ` Vincent Danen
  -- strict thread matches above, loose matches on Subject: below --
2005-01-19  1:13 Larry Doolittle
2005-01-19  3:59 ` Dean Hall
2005-01-19 10:03   ` Milan P. Stanic
2005-01-19  6:08 ` Larry Doolittle
2005-01-19 21:09   ` Thomas Schwinge
2005-01-19  6:39 ` Dean Hall
2005-01-23 12:23 ` Gerrit Pape
2005-01-14 20:08 Larry Doolittle
2005-01-15 16:07 ` Gerrit Pape

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).