[Linux-HA] Heartbeat R2 stonith CIB config

Andrew Beekhof beekhof at gmail.com
Mon Jan 29 02:51:16 MST 2007


On 1/25/07, George H <george.dma at gmail.com> wrote:
> I read all the docs on STONITH R2 config for the CIB.xml, though there
> are some questions I have concerning it.
>
> In the examples they have the stonith <primitive> inside the <clone>
> tags. I've read that <clone> basically creates the same instance on
> all nodes. This is good if my stonith plugin takes the same params
> from every node but what if it doesn't ?

then you use rules to tell us which set to use.

so instead of
<primitive id=my_rsc ....>
        <instance_attributes>
          <attributes>
            <nvpair id="my_attr" name="my_attr" value="xyz"/>
          </attributes>
        </instance_attributes>
</primitive>

you'd have
<primitive id=my_rsc ....>
        <instance_attributes>
	   <rule id="my_rsc:host1">
	     <expression id="my_rsc:host1:expr" attribute="#uname" op="eq"
value="host1"/>
	   </rule>
          <attributes>
            <nvpair id="my_attr_host1" name="my_attr" value="abc"/>
          </attributes>
        </instance_attributes>
        <instance_attributes>
          <attributes>
            <nvpair id="my_attr_default" name="my_attr" value="xyz"/>
          </attributes>
        </instance_attributes>
</primitive>

> Which brings me to my second
> question, can the cib.xml on Node1 be slightly different than from
> Node2 ?

no. never.

>
> For me, node1 has to stonith node2, and node2 stonith node1. My
> external plugins require I give it a hostname of the node I need to
> kill. So naturally the params will differ from each node.
>
> Plus, if I have 3 or more nodes and I have 1 stonith device for every
> node. How does heartbeat know which node needs to stonith what node.

we figure that out based on the hostlist parameter

and if more than one node can shoot someone... then we'll just pick one

> For now my setup is a 2 node cluster so  Node1 kills Node2  and Node2
> kills Node1. What happens if I have 3 or more?
>
> In the stonith XML in the CIB, can I put    #uname  in the  <nvpair>
> value ? like so below:
>
> <nvpair name="ipaddr" value="10.10.10.1"/>
> <nvpair name="username" value="#uname"/>
> <nvpair name="password" value="defaultsecretpass"/>
>
> If I can do this and if Heartbeat sends the "Asssin" node the uname -n
> of the node that needs to be killed, and puts the name in the #uname
> value, then it would be cool for me.
>
> Thanks.
> --
> "Nothing is impossible for the person that doesn't have to do it"
> "The probability of anything happening is in inverse ratio to its desirability"
> "If I were a roman statue, I'd be made alabastard"
> --
> George H
> george.dma at gmail.com
> _______________________________________________
> Linux-HA mailing list
> Linux-HA at lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
>


More information about the Linux-HA mailing list