From: "Daniel Clark" <dclark@pobox.com>
To: supervision@list.skarnet.org
Subject: Re: How to kill runsv, no matter what?
Date: Wed, 21 Feb 2007 16:04:21 -0500 [thread overview]
Message-ID: <5422d5e60702211304g5051747aoad3dd893abaf0b16@mail.gmail.com> (raw)
In-Reply-To: <5422d5e60702211214q7ecaf23co838e9ff1b9be32de@mail.gmail.com>
On 2/21/07, Daniel Clark <dclark@pobox.com> wrote:
> I'm trying to get to a state where I can add and remove the runit
> package without leaving any state behind (I'm using it for runsvdir,
> not as an init replacement). When the package is removed, all of the
> runit services should stop, and state about what services were started
> is saved somewhere; on reinstall, that state should be reintroduced,
> and any runit services should be restarted.
>
> In theory this should be pretty trivial (assuming I am RTFMing
> correctly); I think something like this in the removal stage:
>
> test -d /usr/local/var/service/.disabled || mkdir
> /usr/local/var/service/.disabled
> mv /usr/local/var/service/* /usr/local/var/service/.disabled/ 2>/dev/null \
> || printf "No services to disable.\n"
> printf "Waiting 7 seconds for runsv processes to die...\n"
> sleep 7
> # ... (Code that stops runsvdir) ...
> for service in `ls /usr/local/etc/sv`; do
> test -d /usr/local/etc/sv/$service/supervise \
> && rm -rf /usr/local/etc/sv/$service/supervise
> test -d /usr/local/etc/sv/$service/log/supervise \
> && rm -rf /usr/local/etc/sv/$service/log/supervise
> done
I happened upon an earlier mailing list thread, "sv exit doesn't seem
to work properly" [1], and changed the code to stop runsvdir and then
do a "sv exit" on each service [2], however it didn't help at all.
For simplification the basic question is why "sv exit" doesn't stop
runsv and runsv's associated processes with this particular service,
bcfg2-client; if that can be fixed, then the rest of the problem is
also solved.
The run code for bcfg2-client was in my previous email, or you can see
it here [3] and the script that it calls is here [4].
[1] Re: sv exit doesn't seem to work properly
http://article.gmane.org/gmane.comp.sysutils.supervision.general/1259
[2] runit-1.7.2.ep: preremove script
http://www.bcfg2.org/browser/branches/feature/runit/encap/src/encap-profiles/runit-1.7.2.ep#L182
[3] bcfg2-client run script
http://www.bcfg2.org/browser/branches/feature/runit/encap/src/encap-profiles/bcfg2-0.9.2.ep#L409
[4] Script that the bcfg2-client run script kicks off
http://www.bcfg2.org/browser/branches/feature/runit/encap/src/encap-profiles/bcfg2-0.9.2.ep#L373
next prev parent reply other threads:[~2007-02-21 21:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-21 20:14 Daniel Clark
2007-02-21 21:04 ` Daniel Clark [this message]
2007-02-23 3:51 ` Daniel Clark
2007-02-23 12:02 ` Laurent Bercot
2007-02-23 14:05 ` Gerrit Pape
2007-02-23 14:24 ` Alex Efros
2007-02-23 17:40 ` Daniel Clark
2007-02-23 17:32 ` Daniel Clark
2007-02-23 17:39 ` Paul Jarc
2007-02-23 17:46 ` Daniel Clark
2007-02-23 17:59 ` Paul Jarc
2007-02-23 18:25 ` Daniel Clark
2007-02-23 18:32 ` Paul Jarc
2007-02-28 23:24 ` Daniel Clark
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5422d5e60702211304g5051747aoad3dd893abaf0b16@mail.gmail.com \
--to=dclark@pobox.com \
--cc=supervision@list.skarnet.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).