From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/1625 Path: news.gmane.org!not-for-mail From: Mike Buland Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: using runit as init Date: Sun, 13 Jan 2008 11:49:58 -0700 Organization: Geek Gene Message-ID: <200801131149.58585.mike@geekgene.com> References: <200801032151.21524.list-supervision@augensalat.de> <200801131128.53994.mike@geekgene.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1200250341 11580 80.91.229.12 (13 Jan 2008 18:52:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 13 Jan 2008 18:52:21 +0000 (UTC) To: supervision@list.skarnet.org Original-X-From: supervision-return-1860-gcsg-supervision=m.gmane.org@list.skarnet.org Sun Jan 13 19:52:43 2008 Return-path: Envelope-to: gcsg-supervision@gmane.org Original-Received: from antah.skarnet.org ([212.85.147.14]) by lo.gmane.org with smtp (Exim 4.50) id 1JE7wh-0003tl-Pt for gcsg-supervision@gmane.org; Sun, 13 Jan 2008 19:52:35 +0100 Original-Received: (qmail 17713 invoked by uid 76); 13 Jan 2008 18:52:18 -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 17707 invoked from network); 13 Jan 2008 18:52:18 -0000 User-Agent: KMail/1.9.6 In-Reply-To: Content-Disposition: inline Xref: news.gmane.org gmane.comp.sysutils.supervision.general:1625 Archived-At: 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.