Re: lvsd kills off all nannies!

Jörg Kost <[email protected]> Fri, 19 Jun 2009 14:30:16 +0200
Newsgroups gmane.linux.redhat.piranha
Message-ID <[email protected]>
--Apple-Mail-9-819444403
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	delsp=yes;
	format=flowed

Hi Dan,

i was hitting the same problem and looked inside. The situation is:  
When any children of nanny die for any reason, the lvs-daemon is  
shutting down completely.

As a simple and fast workaround  i changed the source code so lvsd  
alerts the regular syslog process and does not kill the complete  
services. See the attached patch file. Be sure to have a good  
monitoring service for this kind of errors because you will run into  
an inconsistent state between the nanny and ipvs.  However, a restart  
function for killed nannies would be a necessary feature.


Regards



--Apple-Mail-9-819444403
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
	x-unix-mode=0644;
	name=lvsd.patch
Content-Disposition: attachment;
	filename=lvsd.patch

--- lvsd-orig.c 2009-06-19 14:17:15.000000000 +0200
+++ lvsd.c      2009-06-19 14:19:35.000000000 +0200
@@ -1251,18 +1251,19 @@
          if (i < numClients)
            {
              err = findClientConfig (config, &vsn, &sn, clients + i);
-             if (err)
+             if (err) {
                piranha_log (flags,
                             (char *)
                             "nanny died! shutting down lvs");
+               doShutdown = 1;
+               }
              else
                piranha_log (flags,
                             (char *)
-                            "nanny for child %s/%s died! shutting down lvs",
+                            "nanny for child %s/%s died! manual action needed!",
                             config->virtServers[vsn].name,
                             config->virtServers[vsn].servers[sn].name);
              
-             doShutdown = 1;
 
              /* Clean up client pipes */
              clients[i].clientMonitor = -1;


--Apple-Mail-9-819444403
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=ISO-8859-1;
	format=flowed



J=F6rg
--
Mivitec GmbH
Systemadministration
Phone +49 (89) 420 797 87 - 0
http://www.mivitec.de

Mivitec GmbH [Gesch=E4ftsf=FChrer: Alex Mirsky], eingetragen beim
Amtsgericht Regensburg unter HRB8965, Sitz: Eichenstr. 24, 93161 Sinzing
b. Regensburg. Ust.-Id.: DE 228543512 (Finanzamt Regensburg).
Tel. 0941 - 4615854, Fax 0941 - 4612837, eMail: [email protected]


--Apple-Mail-9-819444403
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Piranha-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/piranha-list
--Apple-Mail-9-819444403--