Hi,

On Mon, Feb 02, 2009 at 10:04:06AM +0100, Dominik Klein wrote:
> Terry Hull wrote:
> > I have been looking at STONITH examples on the web and am somewhat confused.
> > I can't figure out how STONITH knows how to kill an individual server.  I've
> > been looking at some examples such as this one.  How does heartbeat know
> > that this will shut off node01.  I see the nodename set to node01, but does
> > that do it?  
> > 
> > <?xml version="1.0" ?>
> > <cib>
> >   <configuration>
> >     <resources>
> >       <primitive id="r_stonith-node01" class="stonith"
> > type="external/ibmrsa-telnet" provider="heartbeat"
> > resource_stickiness="INFINITY">
> >         <operations>
> >           <op name="monitor" interval="60" timeout="300" prereq="nothing"
> > id="r_stonith-node01-mon"/>
> >           <op name="start" timeout="180" id="r_stonith-node01-start"/>
> >           <op name="stop" timeout="180" id="r_stonith-node01-stop"/>
> >         </operations>
> >         <instance_attributes id="r_stonith-node01">
> >           <attributes>
> >             <nvpair id="r_stonith-node01-nodename" name="nodename"
> > value="node01"/>
> >             <nvpair id="r_stonith-node01-ipaddr" name="ipaddr"
> > value="192.168.0.1"/>
> >             <nvpair id="r_stonith-node01-userid" name="userid"
> > value="userid"/>
> >             <nvpair id="r_stonith-node01-passwd" name="passwd"
> > value="password"/>
> >           </attributes>
> >         </instance_attributes>
> >       </primitive>
> >     </resources>
> >     <constraints>
> >       <rsc_location id="r_stonith-node01_hates_node01"
> > rsc="r_stonith-node01">
> >         <rule id="r_stonith-node01_hates_node01_rule" score="-INFINITY">
> >           <expression attribute="#uname"
> > id="r_stonith-node01_hates_node01_expr" operation="eq" value="node01"/>
> >         </rule>
> >       </rsc_location>
> >     </constraints>
> >   </configuration>
> > </cib>
> 
> The stonith daemon uses stonith -l to get the device's nodelist. So it
> knows which nodes a stonith device can manage.

Actually, it uses plugin's gethosts for that. stonith -l does too.

> The location constraint just makes sure the resource is never run on the
> node this device can manage. Actually, that should not be necessary.
> Afaik, the cluster makes sure a stonith resource is -if possible - not
> running on a node which is managed by that agent.

Right, either that, or it drops the hostname of the node it is
running on. If you hate seeing warnings in log files, use the
constraint. Also, if there is more than one node in the list,
then the resource may start and then there may be a node which
cannot be managed.

Thanks,

Dejan


> 
> Regards
> Dominik
> _______________________________________________
> Linux-HA mailing list
> [email protected]
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to