[Linux-HA] API question
alanr at unix.sh
Thu Mar 3 07:20:59 MST 2005
Steve Iribarne wrote:
> I am using the api's to get notified that a state change has occurred.
> Here is what I need to do.
> I have two "blades" in my system. One will be active and the other
> standby. I have a Database that keeps track of my world based on it
> being active or standby.
> So if something bad happens (or even if something good happens (ie. one
> blade gets rebooted for an upgrade or the like), I will need to know
> what is going on.
> So what I think I need to do is the following:
> 1. Register a set_msg_callback with message type set to T_RESOURCES.
> 2. In that callback I keep track of my resource status (i.e. all, none,
> foreign.. etc..)
> 3. When I switch from none to all or all to none I will then do the
> right thing.
> The problem is I get notified that I have changed to transition. But it
> doesn't seem like I am getting notified that I go from transition to all
> or transition to none.
That message isn't all that drives that state.
You might consider creating a resource agent which gets called whenever you
take over or release a particular resource group.
Alan Robertson <alanr at unix.sh>
"Openness is the foundation and preservative of friendship... Let me claim
from you at all times your undisguised opinions." - William Wilberforce
More information about the Linux-HA