maximum Number of IPs in haresources

Horms horms at vergenet.net
Tue Apr 11 16:15:34 MDT 2000


On Tue, Apr 11, 2000 at 02:17:51PM -0700, Horms wrote:
> On Mon, Apr 10, 2000 at 12:00:55PM -0400, Trevor Astrope wrote:

[snip]

> > One other thing, if I change the ip address in haresources and type
> > `/usr/lib/heartbeat/heartbeat -r` the old ip doesn't get taken down, nor
> > does heartbeat bring the new one up. And if I restart suing the rc script,
> > heartbeat can't get the serial port back.

[snip]
 
> Serial Port problem.
> Yikes, 0.4.7 does seem to have a problem. The version that is currently in
> CVS does not. Alan, is it time for 0.4.7a to be released?

I lied. On further inspection this is a bug. The attached patch 
which has been commited to CVS fixes this problem.

-- 
Horms
-------------- next part --------------
--- serial.c.orig	Tue Apr 11 15:10:27 2000
+++ serial.c	Tue Apr 11 15:12:22 2000
@@ -1,4 +1,4 @@
-const static char * _serial_c_Id = "$Id: serial.c,v 1.11 2000/02/23 18:44:53 alan Exp $";
+const static char * _serial_c_Id = "$Id: serial.c,v 1.12 2000/04/11 22:12:22 horms Exp $";
 
 /*
  *	Linux-HA serial heartbeat code
@@ -202,7 +202,7 @@
 			if (sscanf(buf, "%d", &pid) < 1) {
 				/* lockfile screwed up -> rm it and go on */
 			} else {
-				if (kill(pid, 0) != ESRCH) {
+				if (kill(pid, 0)==-1 && errno != ESRCH) {
 					/* tty is locked by existing (not
 					 * necessarily running) process
 					 * -> give up */
@@ -521,6 +521,9 @@
 }
 /*
  * $Log: serial.c,v $
+ * Revision 1.12  2000/04/11 22:12:22  horms
+ * Now cleans locks on serial devices from dead processes succesfully
+ *
  * Revision 1.11  2000/02/23 18:44:53  alan
  * Put in a bug fix from Cliff Liang <lqm at readworld.com> to fix the tty
  * locking code.  The parameters to sscanf were mixed up.


More information about the Linux-HA mailing list