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 you're using >>> an interpreted language. It works quite well for compiled languages. > It works just as well (or as bad) from interpreted languages: > readlink /proc/$pid/exe > (very old linux has a fsid:inode encoding there, but I digress) > > But that does solve a different subset of problems, > has race conditions in itself, and breaks if you have updated the binary > since start of that service (which does happen). > > It does not fully address what I am talking about. It only breaks if you change the *name* of the binary. Updating the binary contents has no effect. Changing the name of the binary is pretty unusual - or so it seems to me. Did I miss something?
And if you do, you should stop with the binary with the old version and start it with the new one. Very few methods are going to deal well with radical changes in the service without stopping it with the old script, updating, and starting with the new script. I don't believe I see the race condition. It won't loop, and it's not fooled by pid wraparound. What else are you looking for? [Guess I missed something else here] _______________________________________________________ Linux-HA-Dev: [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev Home Page: http://linux-ha.org/
