Hello Dejan,
I searched the archive but looked for "ipmi" in the subject, but now
that you mentioned it I searched for "external stonith" and I found an
example.

> See http://linux-ha.org/ExternalStonithPlugins for an example.  You
> can also search the archive of this list for more examples.

I read that page over and over but did not get it. But now I think I get
it. I need one "primitive" per IPMI device. That was the information
that I missed. So this should do the job, shouldn't it?

<clone id="DoFencing">
        <instance_attributes>
                <attributes>
                        <nvpair name="clone_max" value="2"/>
                        <nvpair name="clone_node_max" value="1"/>
                </attributes>
        </instance_attributes>

        <primitive id="postgres-01-fencing" class="stonith" 
type="external/ipmi" provider="heartbeat">
                <operations>
                        <op id="postgres-01-fencing-monitor" name="monitor" 
interval="5s" timeout="20s" prereq="nothing"/>
                        <op id="postgres-01-fencing-start" name="start" 
timeout="20s" prereq="nothing"/>
                </operations>

                <instance_attributes>
                        <attributes>
                                <nvpair id="postgres-01-fencing-hostname" 
name="hostname" value="postgres-01"/>
                                <nvpair id="postgres-01-fencing-ipaddr" 
name="ipaddr" value="172.18.0.121"/>
                                <nvpair id="postgres-01-fencing-userid" 
name="userid" value="Administrator"/>
                                <nvpair id="postgres-01-fencing-passwd" 
name="passwd" value="whatever"/>
                        </attributes>
                </instance_attributes>
        </primitive>

        <primitive id="postgres-02-fencing" class="stonith" 
type="external/ipmi" provider="heartbeat">
                <operations>
                        <op id="postgres-02-fencing-monitor" name="monitor" 
interval="5s" timeout="20s" prereq="nothing"/>
                        <op id="postgres-02-fencing-start" name="start" 
timeout="20s" prereq="nothing"/>
                </operations>

                <instance_attributes>
                        <attributes>
                                <nvpair id="postgres-02-fencing-hostname" 
name="hostname" value="postgres-02"/>
                                <nvpair id="postgres-02-fencing-ipaddr" 
name="ipaddr" value="172.18.0.122"/>
                                <nvpair id="postgres-02-fencing-userid" 
name="userid" value="Administrator"/>
                                <nvpair id="postgres-02-fencing-passwd" 
name="passwd" value="whatever"/>
                        </attributes>
                </instance_attributes>
        </primitive>
</clone>

How can I test the stonith plugin eg. tell heartbeat to shoot someone?

        Thomas
_______________________________________________
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