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 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 cycles. Instead of > polling I would really like a callback. > > I searched the archives for "process death" and did not see any > comments in this area. > > 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. > > 2.If the process is gracefully exiting, it unregisters itself. > > 3.If the process dies, the kernel component would call the action. > > I assume this is already there but I have not found it thus > far. It is similar to the watchdog but I do not want to kill > the whole box, I just want to trigger Pacemaker to do the > monitor/start cycle. > > A possible implementation is: > > The registration opens /dev/process_death and leaves it open > > Graceful exit does an ioctl to /dev/process_death that going down gracefully. > > If a close on /dev/process_death occurs, we know that the > process died and we need to call an action. The action would > then somehow trigger Pacemaker to do the monitor/start cycle of > the resource. > > Is something like this already there or something better? No, there is no resource agent which provides this kind of functionality. There is however a "respawn" directive for Heartbeat, which is used for example to restart crmd, lrmd, and other programs. So far that hasn't been implemented for corosync/openais. Thanks, Dejan > Thanks, > > Bob > > > > _______________________________________________________ > Linux-HA-Dev: [email protected] > http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev > Home Page: http://linux-ha.org/ _______________________________________________________ Linux-HA-Dev: [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev Home Page: http://linux-ha.org/
