From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/579 Path: main.gmane.org!not-for-mail From: Jared Rhine Newsgroups: gmane.comp.sysutils.supervision.general Subject: Nested runsvdir Date: Thu, 16 Sep 2004 12:13:50 -0700 Message-ID: <873c1i2fip.wl@badger.wordzoo.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.4 - "Hosorogi") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1095362048 19031 80.91.229.6 (16 Sep 2004 19:14:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 16 Sep 2004 19:14:08 +0000 (UTC) Original-X-From: supervision-return-818-gcsg-supervision=m.gmane.org@list.skarnet.org Thu Sep 16 21:13:55 2004 Return-path: Original-Received: from antah.skarnet.org ([212.85.147.14] ident=qmailr) by deer.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 1C81ha-0003Ug-00 for ; Thu, 16 Sep 2004 21:13:54 +0200 Original-Received: (qmail 1760 invoked by uid 76); 16 Sep 2004 19:14:14 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Archive: Original-Received: (qmail 1754 invoked from network); 16 Sep 2004 19:14:14 -0000 Original-To: supervision@list.skarnet.org Xref: main.gmane.org gmane.comp.sysutils.supervision.general:579 X-Report-Spam: http://spam.gmane.org/gmane.comp.sysutils.supervision.general:579 Are there any known caveats to "nesting" runsvdir instances? I'm having problems with signals and processes reparenting to init. By nested I mean that an init-started "main" runsvdir has one service which has a run script of: -- begin -- #!/bin/sh exec 2>&1 exec chpst -P -u monitor -e /var/di/monitor/runit/envdir runsvdir -P /var/di/monitor/runit/services 'log: ..........' -- end -- (Yes, I am running the runsvdir -P patch recently sent by Gerrit; I get the same behavior without the patch but I thought I should check to see if it made a difference. I've tried various combinations of pgrp switches without effect.) There are a couple of services defined under /var/di/monitor/runit/services (call them "router" and "archiver"). I can start/stop/manipulate these services fine using runsvctrl. But if I terminate the "parent" service (via runsvctrl down for instance), the router and archiver runsv processes don't die; they instead move to a parent pid of 1. I can then runsvctrl the router and archiver services fine. But this is a bad situation to put the server in and worse case (except I'm using chpst -L lockfiles), I get multiple daemons running. I expect that killing the nested runsvdir should kill all its child services. runit is probably doing the expected thing given what I'm thrown at it, but I don't know what misconfiguration I've done. I didn't think this configuration would cause any unusual issues (Solaris 9/sparc) as the mechanics of signals/waitpid/etc instead a "nested" runsvdir should be about the same, right? Suggestions or snippets of working "nested" runsvdir configurations would be most appreciated. -- jared@wordzoo.com "A pessimist is one who has been intimately acquainted with an optimist." -- Elbert Hubbard