running something different in heartbeat if I'm a failed node!
Jeremy Hansen
jeremy@xxedgexx.com
Thu, 15 Feb 2001 11:39:31 -0500 (EST)
On Wed, 14 Feb 2001, Horms wrote:
> On Wed, Feb 14, 2001 at 11:09:36AM -0500, Jeremy Hansen wrote:
> >
> > I'd like to know if it's possible to spawn applications based on the state
> > of the node.
> >
> > For example, my primary fails, secondary node takes over, runs my
> > application in haresources. I'm using nice_fallback, so the secondary is
> > now the real primary. What i'd like to see is the ability to run another
> > application on the original primary depending on the state of the node.
> >
> > Oh, I'm now the secondary, I'll run mon.
> >
> > Oh, I'm the primary again, I'll run mysql.
> >
> > Are ya pickin' up what I'm layin' down?
> >
> > Perhaps this is already available? It would be swell for what I'm trying
> > to do.
>
> Yes
>
> The resources specified in the haresources are shell scripts. As such
> you can used them to start and stop arbiatry programmes on the system.
> Just define a new resource for each programme you want started
> and stoped and add the resource to the appropriate haresources line.
Ok, well help me understand things in this scenerio. I feel like I'm not
getting something.
NODE A which is primary completely die, someone kicks the power, NODE B
takes over, and in my specific case, haresources starts up mysql when it
gets the ip, but when NODE A comes back up, how in haresources do I say,
"ok, we're no longer the master, instead of attempting to start mysql, I
want to start mon instead. If we become master again, shut down mon and
start up mysql."
Now in cases where the primary node is available, then I could see
something that rewrites the haresources file depending on who is primary,
but in a case where the node completely dies, how would this be done.
Thanks
-jeremy
--
this is my sig.