[ClusterLabs] How to set up fencing/stonith
idevat at redhat.com
Wed May 16 04:12:31 EDT 2018
Dne 16.5.2018 v 05:52 Casey & Gina napsal(a):
> Hi, I'm trying to figure out how to get fencing/stonith going with pacemaker.
> As far as I understand it, they are both part of the same thing - setting up stonith means setting up fencing. If I'm mistaken on that, please let me know.
> Specifically, I'm wanting to use the external/vcenter plugin. I've got the required vCenter CLI software installed and tested with `gethosts`, `on`, `off`, etc. commands as per /usr/share/doc/cluster-glue/stonith/README.vcenter. I'm struggling to understand how to now get it set up with pacemaker.
> Both the aforementioned document as well as https://www.hastexo.com/resources/hints-and-kinks/fencing-vmware-virtualized-pacemaker-nodes/ have instructions for crm, not pcs, and I'm not sure how exactly to translate one to the other. What I've done before in this circumstance is to install crmsh, execute the crm-based command, then look at the resulting .xml and try to figure out a pcs command that creates an equivalent result. Anyways, those two instructions give very different commands, and I don't really understand either.
> Firstly, I'll start with the documentation file included on my system, as I'm assuming that should be the most authoritative. It provides the following two commands as examples:
> crm configure primitive vfencing stonith::external/vcenter params \
> VI_SERVER="10.1.1.1" VI_CREDSTORE="/etc/vicredentials.xml" \
> HOSTLIST="hostname1=vmname1;hostname2=vmname2" RESETPOWERON="0" \
> op monitor interval="60s"
> crm configure clone Fencing vfencing
the pcs alternative commands are:
pcs stonith create vfencing external/vcenter \
VI_SERVER=10.1.1.1 VI_CREDSTORE=/etc/vicredentials.xml \
HOSTLIST="hostname1=vmname1;hostname2=vmname2" RESETPOWERON=0 \
op monitor interval=60s
pcs resource clone vfencing
However, the part `op monitor interval=60s` can be omitted since pcs
takes it from the agent automatically.
The second command can be used but it does not make much sense as
already mentioned by Andrei.
> Why is the second line there? What does it do? Is it necessary? Unfortunately the document doesn't give any explanation.
> Secondly, looking at the web link above, it says to add a primitive for each node in the cluster, as well as a location. This seems rather different than the above approach. Which is more correct?
> Lastly, searching the web for some documentation on how to do this with PCS, I came across https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/configuring_the_red_hat_high_availability_add-on_with_pacemaker/s1-fencedevicecreate-haar - which has yet another totally different way of doing things, by adding a "fencing device". Attempting to fiddle around with fence_vmware command doesn't seem to get me anywhere - how is this related to the external/vcenter module?
> So I'm really confused about what I should do, and why there seems to be radically different ways presented, none of which I can easily grasp. I assume these questions are the same regardless of which particular plugin is being used...
> Is there some good documentation that explains this in better detail and can definitively tell me the best way of going about this, preferably with pcs?
> Thank you,
More information about the Users