On Thu, May 24, 2007 at 03:27:54PM -0400, Brian Reichert wrote:
> On Tue, May 22, 2007 at 05:26:04PM -0400, Brian Reichert wrote:
> Anyway, just like my patch from yesterday (which still hasn't come out of the
> moderator's box yet): this is not a valid statement:
> 
>   If heartbeat.pid contains a pid, and that pid exists, it therefore
>   is the pid if a running heartbeat process.

I've come up with my own patches to work around issues in make_daemon()
and DoLock().  They make different decisions than does the patch
discussed in this thread.

They are twofold:

- I modified /etc/init.d/heartbeat to be more aggressive about
  scrubbing a stale PID file.  It does not use procfs, but is does
  use 'lsof', which is readily available, but may not be installed
  by default on any particular distribution.

- I removed the PID-related checks in DoLock outright; it doesn't
  make any good decision.  I'm not convinced this part of my patching
  is good practice, but with the PID-file scrubbing above, I don't
  have an issue in my tests.

As the former part of my patch is also a bit Linux-specific, I'm
uncertain if the HA project would have any interest.  But, I'm happy
to provide the patches if anyone wants to review them.

A couple of rider questions:

- why doesn't '/etc/init.d/heartbeat status' make use of 'cl_status
hbstatus'?  The current internal logic is kind of broken under Red Hat:

  # /etc/init.d/heartbeat stop
  # echo $$ > /usr/local/var/run/heartbeat.pid
  # /etc/init.d/heartbeat status heartbeat OK [pid 6497 et al] is running on 
foo.example.com [foo.example.com]...
  # cl_status hbstatus
  Heartbeat is stopped on this machine.

- why isn't shellfuncs/BSD_Status() used more universally?  Other
  than having to guess which 'ps' varient the OS is using, it's
  logic is more sound than what make_daemon() and DoLock() do...

-- 
Brian Reichert                          <[EMAIL PROTECTED]>
55 Crystal Ave. #286                    Daytime number: (603) 434-6842
Derry NH 03038-1725 USA                 BSD admin/developer at large    
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to