fence_virsh --how does it work?

Issues related to applications and software problems
spoovy
Posts: 33
Joined: 2010/04/26 20:49:48

fence_virsh --how does it work?

Postby spoovy » 2015/02/02 19:24:04

Sorry if I'm being dim but I cannot figure out how this works. I have two clustered CentOS 7 VMs on the same KVM host and I need to configure STONITH for both VMs to complete the cluster. fence_virsh looks like the proper device to use, and it would seem that I need to create a single fence device (representing the KVM host) and add both VMs to it, so they can both kill the other if needs be, but the command to create the fence forces a 'port' setting, which means only a single VM can be added to the device.

Code: Select all

pcs stonith create fence fence_virsh ipaddr=192.168.99.200 action=stop port=lb-2 login=root identity_file=/root/.ssh/id_rsa


This is what I end up with, which only includes one of the VMs in the stonith section. If I use the other VM, lb-1, in the port= setting, then only that one shows up. What am I missing here?

Code: Select all

[root@lb-2 ~]# pcs status
Cluster name: lbs
Last updated: Mon Feb  2 19:09:28 2015
Last change: Mon Feb  2 19:09:22 2015 via cibadmin on lb-2
Stack: corosync
Current DC: lb-1 (1) - partition with quorum
Version: 1.1.10-32.el7_0.1-368c726
2 Nodes configured
2 Resources configured


Online: [ lb-1 lb-2 ]

Full list of resources:

 fip1   (ocf::heartbeat:IPaddr2):       Started lb-1
 fence  (stonith:fence_virsh):  Started lb-2

PCSD Status:
  lb-1: Online
  lb-2: Online

Daemon Status:
  corosync: active/enabled
  pacemaker: active/enabled
  pcsd: active/enabled


Thanks in advance

spoovy
Posts: 33
Joined: 2010/04/26 20:49:48

Re: fence_virsh --how does it work?

Postby spoovy » 2015/02/02 21:40:18

Solved it I think. Basically the command line complains if you don't create a port at the time you create the fence, but it still creates it, albeit in a broken state. If you then 'update' the fence and add the hosts using pcmk_host_list="foo;bar" it seems to work. Though it still reports "fence (stonith:fence_virsh): Started lb-1" which I don't understand.


Return to “CentOS 7 - Software Support”

Who is online

Users browsing this forum: No registered users and 1 guest