supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: "rehan khan" <rehan.khan@dsl.pipex.com>
To: "Mike Buland" <mike@geekgene.com>, <supervision@list.skarnet.org>
Subject: RE: using runit as init
Date: Sun, 13 Jan 2008 21:06:21 -0000	[thread overview]
Message-ID: <EF2933982E3AB24BA857761C5900CBFC05EE0A07@server.home.internal> (raw)
In-Reply-To: <6A64B0D384404190ACB76E0A376CD148@home.internal>

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

AFAICS the redhat scripts send a term, wait 10 secs then send a kill to the mysql processes ending with the parent process.

From what you guys are saying this is not the right way to stop mysql? If it isn't then someone should probably mention it to Redhat :)


Rehan


-----Original Message-----
From: Mike Buland [mailto:mike@geekgene.com]
Sent: 13 January 2008 19:01
To: supervision@list.skarnet.org
Subject: Re: using runit as init


Hey, a complicated program they made is better than one I have to manage.

If you do read the docs, they don't handle signals in mysqld, like I say, 
mysqlmanager does.  They don't defend it, but they do explain that the only 
way to safely shutdown mysql is to send it a command via the named socket.  
Since this can't be done easily from the commandline without a password, 
unless you configrue mysql to accept the command from root without a 
password, then this seems like a pretty decent solution, since this program 
basically supervises it's child mysql processes and sends them a safe 
shutdown signal when the mysqlmanager program receives a term signal.

All the scripts I've read from debian and redhat just send a kill...although 
this seems alright most of the time (and they are official scripts), that 
doesn't gurantee that data is flushed to disk, if mysql is in the middle of a 
large operation, that data is gone.  This solution does solve that problem, 
and keep runit from waiting for mysql to TERM.

--Mike

On Sunday 13 January 2008 11:39:56 am Charlie Brady wrote:
> On Sun, 13 Jan 2008, Mike Buland wrote:
> > On Sunday 13 January 2008 08:36:31 am Charlie Brady wrote:
> >> On Sat, 12 Jan 2008, Vincent Danen wrote:
> >>> mysqld is no more complex than anything else.
> >>
> >> Have they fixed it then, so that the master process kills children
> >> before dying?
> >
> > Yes, read the (very lame) docs on mysqlmanager.  It also now responds to
> > other signals (such as term) so it plays nicely with runit :)
>
> This might actually mean "no". They haven't fixed the signal
> handling in mysqld, but have instead introduced a new complicated program
> to try to work around the issues.
>
> > mysqlmanager was introduced sometime in mysql 5, not sure when.
>
> Introduced in 5.0.3. Not used by default since 5.0.4.





[-- Attachment #2: Type: text/html, Size: 3097 bytes --]

  parent reply	other threads:[~2008-01-13 21:06 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-03 20:51 Bernhard Graf
2008-01-04  0:22 ` Mike Buland
2008-01-05  0:06   ` Bernhard Graf
     [not found]   ` <12EC84FDD73F4BD8A78E7501EB19F1E2@home.internal>
2008-01-05  7:45     ` rehan khan
2008-01-05 23:17       ` Bernhard Graf
2008-01-08  7:11         ` Vincent Danen
2008-01-08 22:28           ` Bernhard Graf
2008-01-09  2:05             ` Vincent Danen
2008-01-09 23:06               ` Bernhard Graf
2008-01-09 23:34                 ` Mike Buland
2008-01-09 23:51                   ` Charlie Brady
2008-01-10  9:22                     ` Bernhard Graf
2008-01-10  9:20                   ` Bernhard Graf
2008-01-10 20:06                     ` Mike Buland
2008-01-11  7:58                       ` Bernhard Graf
2008-01-11 14:30                         ` Mike Buland
2008-01-12 10:18                           ` Bernhard Graf
2008-01-12 17:13                             ` supervising (Re: using runit as init) Charlie Brady
2008-01-12 17:32                               ` supervising mysql (Re: supervising (Re: using runit as init)) Charlie Brady
2008-01-13  4:40                             ` using runit as init Vincent Danen
2008-01-13 15:36                               ` Charlie Brady
2008-01-13 18:28                                 ` Mike Buland
2008-01-13 18:39                                   ` Charlie Brady
2008-01-13 18:49                                     ` Mike Buland
2008-01-14  3:55                                       ` Vincent Danen
2008-01-14 15:11                                         ` Charlie Brady
2008-01-14 15:21                                           ` Vincent Danen
     [not found]                                     ` <6A64B0D384404190ACB76E0A376CD148@home.internal>
2008-01-13 21:06                                       ` rehan khan [this message]
2008-01-14  3:53                                 ` Vincent Danen
     [not found]                             ` <CDFFB8AF013F4762AE02CF6A1BDCB27A@home.internal>
2008-01-13 10:35                               ` rehan khan
2008-01-14  3:50                                 ` Vincent Danen
2008-01-13 18:52                             ` Mike Buland
     [not found]                     ` <85040AD9CA634253A8FDB9F7DA6BD200@home.internal>
2008-01-10 22:08                       ` rehan khan
2008-01-11  1:28                         ` Charlie Brady
     [not found]                   ` <C1A5323F485E4A75B75ADB58B664E35E@home.internal>
2008-01-10 21:56                     ` rehan khan
2008-01-09 23:35                 ` KORN Andras
2008-01-10  8:39                   ` Bernhard Graf

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=EF2933982E3AB24BA857761C5900CBFC05EE0A07@server.home.internal \
    --to=rehan.khan@dsl.pipex.com \
    --cc=mike@geekgene.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).