supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Charlie Brady <charlieb-supervision@budge.apana.org.au>
Cc: supervision@list.skarnet.org
Subject: Re: supervising postfix
Date: Sat, 16 Oct 2004 16:11:45 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.44.0410161549080.4200-100000@e-smith.charlieb.ott.istop.com> (raw)
In-Reply-To: <7F25AD67-1FA9-11D9-8DD8-000A9598BFB2@annvix.org>


On Sat, 16 Oct 2004, Vincent Danen wrote:

> >> $daemon_directory/master 2>&1
> >>
> >> I can't use exec for master because if I do I get this written to my
> >> mail.log:
> >>
> >> Oct  9 14:31:46 test postfix/master[1941]: fatal: unable to set 
> >> session
> >> and process group ID: Operation not permitted
...
> >> I'm really stumped on this one...
> >
> > You'll either need to ensure that the run script is not a process group
> > leader (remove -P from runsvdir, and possibly add "chpst -P" to most 
> > other
> > run scripts), or fix postfix to turn the fatal error into a warning.
> 
> runsvdir doesn't run with -P.  I tried using chpst -P on postfix, but 
> that didn't work.  I'm not too terribly interested in changing all the 
> runscripts to chpst -P every other service (I haven't had the need to 
> do it for any yet).

It's a defensive measure. you can't control when or if a process will kill 
its own process group. And you don't want any of those processes taking 
out all your stage 2. You won't have the need for it, until you have the 
need for it!

> Patching postfix is not my idea of a good time, either.  I'd prefer to 
> not mangle as much software as possible because it becomes a 
> maintenance nuisance.

Sure, but you already have a maintenance problem, right now. Postfix 
doesn't run for you.

If you are not using -P anywhere, then maybe you've found a bug with 
postfix, and it is trying multiple times to become process group leader or 
something. Have you straced it, so you can see what is being called when?

> I think what I may end up doing is calling "postfix start" from stage 2 
> if something like /etc/sysconfig/postfix contains "START=yes" or 
> something similar.  Then in stage 3 I'll issue a "postfix stop".  Goes 
> against how I like to do things, but it seems like "master" is doing a 
> bit of supervision on it's own so instead of using (on Annvix anyways) 
> "srv stop postfix" one would have to issue "postfix stop".  I dislike 
> that it needs to be different, but at least this way I don't have to 
> fall back to a traditional initscript.  I could then have a runscript 
> for service postfix that just checks every few seconds to make sure 
> that master is still running, and if it is, sleep for another 5 seconds 
> and then do another check.  If master doesn't seem to be running, then 
> just issue "postfix start" and sleep again.
> 
> A bit of a compromise, but I think it might be the best solution.

Sounds aweful :-(

---
Charlie



  reply	other threads:[~2004-10-16 20:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-16  4:35 Vincent Danen
2004-10-16 19:11 ` Charlie Brady
2004-10-16 19:28   ` Vincent Danen
2004-10-16 20:11     ` Charlie Brady [this message]
2004-10-16 23:37       ` Vincent Danen
2004-10-17  1:38         ` Vincent Danen
2004-10-16 20:42   ` Charlie Brady
2004-11-01 21:45   ` Csillag Tamas

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=Pine.LNX.4.44.0410161549080.4200-100000@e-smith.charlieb.ott.istop.com \
    --to=charlieb-supervision@budge.apana.org.au \
    --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).