[Linux-HA] issue with management of heartbeat.pid file
Andrew Beekhof
beekhof at gmail.com
Thu May 24 07:07:19 MDT 2007
On 5/24/07, David Lee <t.d.lee at durham.ac.uk> wrote:
> On Thu, 24 May 2007, Andrew Beekhof wrote:
>
> > On 5/24/07, Kevin Jamieson <kevin at kevinjamieson.com> wrote:
> > > Brian Reichert wrote:
> > >
> > > > What I tracked down was that if the box powered down too quickly
> > > > for heartbeat to clean up, a PID file was left in place:
> > > >
> > > > ...
> > > >
> > > > But, there's no check to assure the recorded PID is not stale.
> > > >
> > > > Have others seen this? This code seems to be in 2.0.8 as well...
> > >
> > > FYI, I filed a bug on this a few months back:
> > >
> > > http://old.linux-foundation.org/developer_bugzilla/show_bug.cgi?id=1454
> > >
> > > There's a patch attached to that bug that worked for us (although the
> > > patch is Linux-specific, so may not be ideal).
> >
> > I took a few moments to modify the patch so that non-linux systems dont
> > break.
> >
> > Will commit momentarily.
>
> Andrew: Thanks for doing that, especially the concern for the non-Linux
> systems. That concern is much appreciated.
>
> Alas: The "test -e" that attempts to do this is itself non-portable
> (so bad shell syntax etc.).
>
> I think the relevant (for this context) flags that seem to be common
> across a variety of OSes (for portability) are:
> -f: exists and is a regular file
> -d: exists and is a directory
> -r: exists and is readable
> -x: exists and is executable
>
> How to proceed? On my local systems which have "/proc", the pid-like
> entries seem to be directories. On one of them it is "dr-xr-xr-x", on
> another it is "dr-x--x--x".
>
> On the basis of that, would "test -d" be better?
>
>
> Also, the update has "echo ..." to print configure's output. The official
> "configure" method to achieve that is (as I understand it) the AC_MSG_*()
> family of macros.
>
> Sorry to be negative on that aspect. The rest of the update seems to be a
> nice abstraction and structure! Thanks,
>
done, sorry
More information about the Linux-HA
mailing list