[ClusterLabs] How to set up fencing/stonith

Casey & Gina caseyandgina at icloud.com
Fri May 18 11:40:03 EDT 2018

> Thank you - I hadn't seen the "releases" link on github before and somehow missed that.  Sorry for that.  I thought there would be download links somewhere on the clusterlabs website.  I will try compiling this today to try.

I finally managed to get pcs-0.9.164 compiled and installed.  There were a number of dependencies to figure out, so I thought I'd send what I ended up doing in case it helps somebody else (using Ubuntu 16.04).  I needed to do the following:

apt install python3-setuptools python3-lxml fonts-liberation fontconfig libpam0g-dev bundler ruby-rpam-ruby19

I'm not sure that the ruby-rpam-ruby19 package installation is actually necessary, as it didn't seem to work:

Could not find rpam-ruby19-1.2.1.gem for installation

So, I did this as well, which I guess did the same thing the package install should have done?:

gem install rpam-ruby19 -v '1.2.1'

Anyways, after that I started up the pcsd service, and proceeded to try to start the cluster.  This appeared to work okay, until I tried to do `pcs cluster start --all`, which resulted in HTTP 400 errors.  Using --debug, I saw that it was failing to start corosync because the directory /var/log/cluster did not exist.  Not sure why this would be, since corosync was installed using the apt package, and with the other pcs version it used /var/log/corosync as the logging directory.  Nonetheless I created /var/log/cluster, and then the cluster started okay.

Finally, I tried adding the stonith resource with the following command, and ran into an error that I don't know how to solve:

pcs stonith create vfencing external/vcenter VI_SERVER= VI_CREDSTORE=/etc/pacemaker/vicredentials.xml HOSTLIST="d-gp2-dbpg0-1=d-gp2-dbpg0-1;d-gp2-dbpg0-2=d-gp2-dbpg0-2;d-gp2-dbpg0-3=d-gp2-dbpg0-3" RESETPOWERON=0

Error: unable to run command /usr/lib/x86_64-linux-gnu/pacemaker/stonithd metadata: No such file or directory: '/usr/lib/x86_64-linux-gnu/pacemaker/stonithd'

I'm not sure why it's including x86_64-linux-gnu in the path - the actual path, as provided by the pacemaker package, is /usr/lib/pacemaker/stonithd.  Is there a way to set this path correct when compiling/installing pcs from the source package?


More information about the Users mailing list