Re: [Linux-ha-dev] Monitoring Process Death

2010-06-02 Thread Dejan Muhamedagic
Hi, On Wed, Jun 02, 2010 at 12:08:51PM +0200, Lars Marowsky-Bree wrote: > On 2010-06-01T00:37:24, Lars Ellenberg wrote: > > > Once we notice, what are we supposed to do? > > Not do any action ourselve, > > but tell pacemaker the resource has failed, > > because that is where $policy lives? > >

Re: [Linux-ha-dev] Monitoring Process Death

2010-06-02 Thread Lars Marowsky-Bree
On 2010-06-02T15:39:26, Lars Ellenberg wrote: > Most auto-backgrounding thingies also have a "foreground" mode. No. SAP etc don't. > BTW, the RA cannot register the pid of the background process either, > as it only knows the pid of the process before it backgrounded itself. It can deduce them

Re: [Linux-ha-dev] Monitoring Process Death

2010-06-02 Thread Lars Ellenberg
On Wed, Jun 02, 2010 at 03:19:08PM +0200, Lars Marowsky-Bree wrote: > On 2010-06-02T14:51:25, Lars Ellenberg wrote: > > > I'd not put it into the RA. > > I'd write a wrapper around whatever process is supposed to run. > > maybe a shell script, or a shell function. > > > > somthing like that: > >

Re: [Linux-ha-dev] Monitoring Process Death

2010-06-02 Thread Lars Marowsky-Bree
On 2010-06-02T14:51:25, Lars Ellenberg wrote: > I'd not put it into the RA. > I'd write a wrapper around whatever process is supposed to run. > maybe a shell script, or a shell function. > > somthing like that: > > call_crm_resource-F_on_process_exit.sh > #!/bin/sh > # takes OCF_RESOURCE_INSTAN

Re: [Linux-ha-dev] Monitoring Process Death

2010-06-02 Thread Lars Ellenberg
On Wed, Jun 02, 2010 at 12:08:51PM +0200, Lars Marowsky-Bree wrote: > On 2010-06-01T00:37:24, Lars Ellenberg wrote: > > > Once we notice, what are we supposed to do? > > Not do any action ourselve, > > but tell pacemaker the resource has failed, > > because that is where $policy lives? > > Yes,

Re: [Linux-ha-dev] Monitoring Process Death

2010-06-02 Thread Lars Marowsky-Bree
On 2010-06-01T00:37:24, Lars Ellenberg wrote: > Once we notice, what are we supposed to do? > Not do any action ourselve, > but tell pacemaker the resource has failed, > because that is where $policy lives? Yes, that's it, I think. Sorry for the outburst, I'm really overly ripe for a vacation.

Re: [Linux-ha-dev] Monitoring Process Death

2010-05-31 Thread Lars Ellenberg
On Mon, May 31, 2010 at 10:48:02PM +0200, Lars Marowsky-Bree wrote: ... > You're embedding policy into code here. Who said anything about the > proper response being the daemon being restarted being the right > response? Maybe the whole point is to initiate full PE-level recovery? > > > Of course

Re: [Linux-ha-dev] Monitoring Process Death

2010-05-31 Thread Lars Marowsky-Bree
On 2010-05-31T18:16:30, Lars Ellenberg wrote: > There are several flavors of overhead. > One underestimated is programming and code maintenance overhead ;-) > > Why would we "register pid with lrm" and duplicate code from heartbeat > proper to lrmd and whatnot, or even rewrite the respawn from s

Re: [Linux-ha-dev] Monitoring Process Death

2010-05-31 Thread Lars Ellenberg
On Mon, May 31, 2010 at 04:47:43PM +0200, Lars Marowsky-Bree wrote: > On 2010-05-31T11:45:37, Lars Ellenberg wrote: > > > Use the "anything" resource agent, and define a monitor action script > > of your choice? or put a loop in your script, and restart whatever is > > necessary from there, then

Re: [Linux-ha-dev] Monitoring Process Death

2010-05-31 Thread Lars Marowsky-Bree
On 2010-05-31T11:45:37, Lars Ellenberg wrote: > Use the "anything" resource agent, and define a monitor action script > of your choice? or put a loop in your script, and restart whatever is > necessary from there, then let lrm monitor your script, and restart > that script if necessary? That is

Re: [Linux-ha-dev] Monitoring Process Death

2010-05-31 Thread Lars Marowsky-Bree
On 2010-05-28T16:09:03, Bob Schatz wrote: > I have started reading the lrmd source. > > One thing I am worried about is that if I give a PID to lrmd, how will lrmd > monitor it? > > My RA is a shell script that forks off a daemon. If I give this daemon PID > to lrmd does lrmd start a thread

Re: [Linux-ha-dev] Monitoring Process Death

2010-05-31 Thread Lars Ellenberg
On Fri, May 28, 2010 at 04:09:03PM -0700, Bob Schatz wrote: > Thanks Lars and Dejan for your feedback. > > I have started reading the lrmd source. Good old inittab, anyone? > One thing I am worried about is that if I give a PID to lrmd, how will lrmd > monitor it? > My RA is a shell script that

Re: [Linux-ha-dev] Monitoring Process Death

2010-05-28 Thread Bob Schatz
? I don't think that lrmd would get a SIGCHLD in my case. Thanks, Bob - Original Message From: Lars Marowsky-Bree To: High-Availability Linux Development List Sent: Fri, May 28, 2010 8:49:28 AM Subject: Re: [Linux-ha-dev] Monitoring Process Death On 2010-05-21T12:12:12, Bob S

Re: [Linux-ha-dev] Monitoring Process Death

2010-05-28 Thread Lars Marowsky-Bree
On 2010-05-21T12:12:12, Bob Schatz wrote: > I think the basic requirements are: > > 1.When a process starts it registers itself with a kernel component. This > registration also gets passed an action. The easiest way would be for the RA to register pids to be monitored to lrmd, and have lrmd

Re: [Linux-ha-dev] Monitoring Process Death

2010-05-26 Thread Dejan Muhamedagic
Hi, On Fri, May 21, 2010 at 12:12:12PM -0700, Bob Schatz wrote: > I have an agent which monitors a process and restarts it. There's also a RA called "anything" which does exactly this. > It works fine. > > The one thing I would like to improve is how quickly it notices > that a process has died

[Linux-ha-dev] Monitoring Process Death

2010-05-21 Thread Bob Schatz
I have an agent which monitors a process and restarts it. It works fine. The one thing I would like to improve is how quickly it notices that a process has died and fails over or restarts it. I know that I can increase the monitoring level to do this. However, it seems like a lot of wasted cy