Re: [Linux-ha-dev] RFC: pidfile handling; current worst case: stop failure and node level fencing

2014-10-24 Thread Alan Robertson
On 10/24/2014 03:32 AM, Lars Marowsky-Bree wrote: > On 2014-10-23T20:36:38, Lars Ellenberg wrote: > >> If we want to require presence of start-stop-daemon, >> we could make all this somebody elses problem. >> I need find some time to browse through the code >> to see if it can be improved further.

Re: [Linux-ha-dev] RFC: pidfile handling; current worst case: stop failure and node level fencing

2014-10-24 Thread Dejan Muhamedagic
On Thu, Oct 23, 2014 at 08:36:38PM +0200, Lars Ellenberg wrote: > On Tue, Oct 21, 2014 at 02:06:24PM +0100, Tim Small wrote: > > On 20/10/14 20:17, Lars Ellenberg wrote: > > > In other OSes, ps may be able to give a good enough equivalent? > > > > Debian's start-stop-daemon executable might be wor

Re: [Linux-ha-dev] RFC: pidfile handling; current worst case: stop failure and node level fencing

2014-10-24 Thread Dejan Muhamedagic
On Thu, Oct 23, 2014 at 09:14:32PM +0200, Lars Ellenberg wrote: > On Wed, Oct 22, 2014 at 03:09:12PM +0200, Dejan Muhamedagic wrote: > > On Wed, Oct 22, 2014 at 06:50:37AM -0600, Alan Robertson wrote: > > > On 10/22/2014 03:33 AM, Dejan Muhamedagic wrote: > > > > Hi Alan, > > > > > > > > On Mon, Oc

Re: [Linux-ha-dev] RFC: pidfile handling; current worst case: stop failure and node level fencing

2014-10-24 Thread Lars Marowsky-Bree
On 2014-10-23T20:36:38, Lars Ellenberg wrote: > If we want to require presence of start-stop-daemon, > we could make all this somebody elses problem. > I need find some time to browse through the code > to see if it can be improved further. > But in any case, using (a tool like) start-stop-daemon

Re: [Linux-ha-dev] RFC: pidfile handling; current worst case: stop failure and node level fencing

2014-10-23 Thread Lars Ellenberg
On Wed, Oct 22, 2014 at 02:11:21PM +0100, Tim Small wrote: > On 22/10/14 13:50, Alan Robertson wrote: > > Does anyone know which OSes have either or both of those /proc names? > > Once again, can I recommend taking a look at the start-stop-daemon > source (see earlier posting), which does this stu

Re: [Linux-ha-dev] RFC: pidfile handling; current worst case: stop failure and node level fencing

2014-10-23 Thread Lars Ellenberg
On Wed, Oct 22, 2014 at 03:09:12PM +0200, Dejan Muhamedagic wrote: > On Wed, Oct 22, 2014 at 06:50:37AM -0600, Alan Robertson wrote: > > On 10/22/2014 03:33 AM, Dejan Muhamedagic wrote: > > > Hi Alan, > > > > > > On Mon, Oct 20, 2014 at 02:52:13PM -0600, Alan Robertson wrote: > > >> For the Assimil

Re: [Linux-ha-dev] RFC: pidfile handling; current worst case: stop failure and node level fencing

2014-10-23 Thread Lars Ellenberg
On Tue, Oct 21, 2014 at 02:06:24PM +0100, Tim Small wrote: > On 20/10/14 20:17, Lars Ellenberg wrote: > > In other OSes, ps may be able to give a good enough equivalent? > > Debian's start-stop-daemon executable might be worth considering here - > it's used extensively in the init script infrastru

Re: [Linux-ha-dev] RFC: pidfile handling; current worst case: stop failure and node level fencing

2014-10-22 Thread Alan Robertson
On 10/22/2014 07:11 AM, Tim Small wrote: > On 22/10/14 13:50, Alan Robertson wrote: >> Does anyone know which OSes have either or both of those /proc names? > Once again, can I recommend taking a look at the start-stop-daemon > source (see earlier posting), which does this stuff, and includes check

Re: [Linux-ha-dev] RFC: pidfile handling; current worst case: stop failure and node level fencing

2014-10-22 Thread Alan Robertson
On 10/22/2014 07:09 AM, Dejan Muhamedagic wrote: > On Wed, Oct 22, 2014 at 06:50:37AM -0600, Alan Robertson wrote: >> On 10/22/2014 03:33 AM, Dejan Muhamedagic wrote: >>> Hi Alan, >>> >>> On Mon, Oct 20, 2014 at 02:52:13PM -0600, Alan Robertson wrote: For the Assimilation code I use the full p

Re: [Linux-ha-dev] RFC: pidfile handling; current worst case: stop failure and node level fencing

2014-10-22 Thread Tim Small
On 22/10/14 13:50, Alan Robertson wrote: > Does anyone know which OSes have either or both of those /proc names? Once again, can I recommend taking a look at the start-stop-daemon source (see earlier posting), which does this stuff, and includes checks for Linux/Hurd/Sun/OpenBSD/FreeBSD/NetBSD/Dra

Re: [Linux-ha-dev] RFC: pidfile handling; current worst case: stop failure and node level fencing

2014-10-22 Thread Dejan Muhamedagic
On Wed, Oct 22, 2014 at 06:50:37AM -0600, Alan Robertson wrote: > On 10/22/2014 03:33 AM, Dejan Muhamedagic wrote: > > Hi Alan, > > > > On Mon, Oct 20, 2014 at 02:52:13PM -0600, Alan Robertson wrote: > >> For the Assimilation code I use the full pathname of the binary from > >> /proc to tell if it'

Re: [Linux-ha-dev] RFC: pidfile handling; current worst case: stop failure and node level fencing

2014-10-22 Thread Alan Robertson
On 10/22/2014 03:33 AM, Dejan Muhamedagic wrote: > Hi Alan, > > On Mon, Oct 20, 2014 at 02:52:13PM -0600, Alan Robertson wrote: >> For the Assimilation code I use the full pathname of the binary from >> /proc to tell if it's "one of mine". That's not perfect if you're using >> an interpreted langu

Re: [Linux-ha-dev] RFC: pidfile handling; current worst case: stop failure and node level fencing

2014-10-22 Thread Dejan Muhamedagic
Hi Alan, On Mon, Oct 20, 2014 at 02:52:13PM -0600, Alan Robertson wrote: > For the Assimilation code I use the full pathname of the binary from > /proc to tell if it's "one of mine". That's not perfect if you're using > an interpreted language. It works quite well for compiled languages. Yes, t

Re: [Linux-ha-dev] RFC: pidfile handling; current worst case: stop failure and node level fencing

2014-10-22 Thread Dejan Muhamedagic
Hi Lars, On Mon, Oct 20, 2014 at 09:17:29PM +0200, Lars Ellenberg wrote: > > Recent discussions with Dejan made me again more prominently aware of a > few issues we probably all know about, but usually dismis as having not > much relevance in the real-world. > > The facts: > > * a pidfile typi

Re: [Linux-ha-dev] RFC: pidfile handling; current worst case: stop failure and node level fencing

2014-10-21 Thread Tim Small
On 20/10/14 20:17, Lars Ellenberg wrote: > In other OSes, ps may be able to give a good enough equivalent? Debian's start-stop-daemon executable might be worth considering here - it's used extensively in the init script infrastructure of Debian (and derivatives, over several different OS kernels),

Re: [Linux-ha-dev] RFC: pidfile handling; current worst case: stop failure and node level fencing

2014-10-21 Thread Alan Robertson
On 10/21/2014 2:29 AM, Lars Ellenberg wrote: On Mon, Oct 20, 2014 at 11:21:36PM +0200, Lars Ellenberg wrote: On Mon, Oct 20, 2014 at 03:04:31PM -0600, Alan Robertson wrote: On 10/20/2014 02:52 PM, Alan Robertson wrote: For the Assimilation code I use the full pathname of the binary from /proc

Re: [Linux-ha-dev] RFC: pidfile handling; current worst case: stop failure and node level fencing

2014-10-21 Thread Lars Ellenberg
>On Mon, Oct 20, 2014 at 11:21:36PM +0200, Lars Ellenberg wrote: >> On Mon, Oct 20, 2014 at 03:04:31PM -0600, Alan Robertson wrote: >> > On 10/20/2014 02:52 PM, Alan Robertson wrote: >> > > For the Assimilation code I use the full pathname of the binary from >> > > /proc to tell if it's "one of min

Re: [Linux-ha-dev] RFC: pidfile handling; current worst case: stop failure and node level fencing

2014-10-20 Thread Alan Robertson
On 10/20/2014 03:21 PM, Lars Ellenberg wrote: > On Mon, Oct 20, 2014 at 03:04:31PM -0600, Alan Robertson wrote: >> On 10/20/2014 02:52 PM, Alan Robertson wrote: >>> For the Assimilation code I use the full pathname of the binary from >>> /proc to tell if it's "one of mine". That's not perfect if y

Re: [Linux-ha-dev] RFC: pidfile handling; current worst case: stop failure and node level fencing

2014-10-20 Thread Lars Ellenberg
On Mon, Oct 20, 2014 at 03:04:31PM -0600, Alan Robertson wrote: > On 10/20/2014 02:52 PM, Alan Robertson wrote: > > For the Assimilation code I use the full pathname of the binary from > > /proc to tell if it's "one of mine". That's not perfect if you're using > > an interpreted language. It work

Re: [Linux-ha-dev] RFC: pidfile handling; current worst case: stop failure and node level fencing

2014-10-20 Thread Alan Robertson
For the Assimilation code I use the full pathname of the binary from /proc to tell if it's "one of mine". That's not perfect if you're using an interpreted language. It works quite well for compiled languages. On 10/20/2014 01:17 PM, Lars Ellenberg wrote: > Recent discussions with Dejan made me

[Linux-ha-dev] RFC: pidfile handling; current worst case: stop failure and node level fencing

2014-10-20 Thread Lars Ellenberg
Recent discussions with Dejan made me again more prominently aware of a few issues we probably all know about, but usually dismis as having not much relevance in the real-world. The facts: * a pidfile typically only stores a pid * a pidfile may "stale", not properly cleaned up when the pid