[Linux-HA] Shared Resource across groups
Thurston Nabe
thurston at angelpoints.com
Wed Aug 2 12:21:06 MDT 2006
Hello,
After carefully reading the DTD and the wiki, I'm still not clear as to
how to do what I want to do.
This is the scenario I would like to configure
Assume two groups: (pseudo-configuration)
<group id="A">
<resource type="ip" value="ip-1"/>
<resource type="database" />
</group>
<group id="B">
<resource type="ip" value="ip-2"/>
<resource type="database" />
</group>
In the nominal case, group A runs on node A and group B runs on node B.
So far so good.
If group A fails for any reason (and I'm running monitor actions on both
the ip resource and the database), I want heartbeat to migrate ip-A over
to node B (and this doesn't present a problem). But I don't need the
"database" resource to migrate to node B per se, because the database
resource is already up and running as part of group B (I don't want
multiple instances (processes) of the database to ever be running on the
SAME node). My applications will still work with one database instance
(process) running on one node and serving two ips.
This probably wouldn't present a problem as far as heartbeat calling
"start" on the database resource--I can just return OCF_SUCCESS if it's
already running.
But there are two issues:
1. I'd prefer not to have the monitor action be called twice as often
in this case--it's calling the exact same resource script which is
testing to see whether the same database instance is up and functioning.
2. The real problem is on action "stop" (let's say because node A's
problems have been fixed and it's ready to go, and I want heartbeat to
always choose running only one group per node if at all possible)--so
heartbeat would first call stop on the group A running on node B because
it wants to migrate group A back to node A). As far as the ip-1
resource no problem, but I don't want to honor the call to stop on the
database resource, because that same database process is serving group
B.
I'm assuming this is possible with a set of resource constraints and
rules, but I couldn't figure out how. I had thought about just not
implementing the stop action in the database resource script (returning
OCF_SUCCESS but not actually shutting down the database process), but I
worry that heartbeat (perhaps via "just-checking" monitor calls will
detect a false "split-brained" condition) and it's a bit of a hack.
If someone has encountered a similar scenario and could post a cib.xml
or offer other help, I'd appreciate it.
Thanks.
More information about the Linux-HA
mailing list