[ovirt-devel] Custom fencing with virsh_fence
Adam Litke
alitke at redhat.com
Tue Jul 15 19:12:42 UTC 2014
On 15/07/14 17:59 +0200, Juan Hernandez wrote:
>On 07/15/2014 05:51 PM, Adam Litke wrote:
>> Hi all,
>>
>> I am trying to configure custom fencing using fence_virsh in order to
>> test out fencing flows with my virtualized oVirt hosts. I'm getting a
>> failure when clicking the "Test" button. Can someone help me to
>> diagnose the problem? I have applied the following settings using
>> engine-config:
>>
>> ~/ovirt-engine/bin/engine-config -s CustomVdsFenceType="xxxvirt"
>> ~/ovirt-engine/bin/engine-config -s CustomFenceAgentMapping="xxxvirt=virsh"
>> ~/ovirt-engine/bin/engine-config -s CustomVdsFenceOptionMapping="xxxvirt:address=ip,username=username,password=password"
>>
>> (note that engine-config seems to arbitrarily limit the number of
>> mapped options to 3. Seems like a bug to me).
>>
>>
>> Here is the log output in engine.log:
>>
>> 2014-07-15 11:43:34,813 INFO
>> [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector]
>> (http--0.0.0.0-8080-1) Correlation ID: null, Call Stack: null, Custom
>> Event ID: -1, Message: Host centennial from cluster block was chosen
>> as a proxy to execute Status command on Host cascade.
>> 2014-07-15 11:43:34,813 INFO
>> [org.ovirt.engine.core.bll.FenceExecutor] (http--0.0.0.0-8080-1) Using
>> Host centennial from cluster block as proxy to execute Status command
>> on Host
>> 2014-07-15 11:43:34,815 INFO
>> [org.ovirt.engine.core.bll.FenceExecutor] (http--0.0.0.0-8080-1)
>> Executing <Status> Power Management command, Proxy Host:centennial,
>> Agent:virsh, Target Host:, Management IP:192.168.2.101, User:root,
>> Options:
>> 2014-07-15 11:43:34,816 INFO
>> [org.ovirt.engine.core.vdsbroker.vdsbroker.FenceVdsVDSCommand]
>> (http--0.0.0.0-8080-1) START, FenceVdsVDSCommand(HostName =
>> centennial, HostId = a34f7dbc-dd99-4831-a1a9-54c411080ec1, targetVdsId
>> = b6b9d480-e20f-411a-9b9c-883fac32a4e5, action = Status, ip =
>> 192.168.2.101, port = , type = virsh, user = root, password = ******,
>> options = ''), log id: 24f33bda
>> 2014-07-15 11:43:34,875 ERROR
>> [org.ovirt.engine.core.vdsbroker.vdsbroker.FenceVdsVDSCommand]
>> (http--0.0.0.0-8080-1) Failed in FenceVdsVDS method, for vds:
>> centennial; host: 192.168.2.103
>> 2014-07-15 11:43:34,876 ERROR
>> [org.ovirt.engine.core.vdsbroker.vdsbroker.FenceVdsVDSCommand]
>> (http--0.0.0.0-8080-1) Command FenceVdsVDSCommand(HostName =
>> centennial, HostId = a34f7dbc-dd99-4831-a1a9-54c411080ec1, targetVdsId
>> = b6b9d480-e20f-411a-9b9c-883fac32a4e5, action = Status, ip =
>> 192.168.2.101, port = , type = virsh, user = root, password = ******,
>> options = '') execution failed. Exception: ClassCastException:
>> [Ljava.lang.Object; cannot be cast to java.lang.String
>> 2014-07-15 11:43:34,877 INFO
>> [org.ovirt.engine.core.vdsbroker.vdsbroker.FenceVdsVDSCommand]
>> (http--0.0.0.0-8080-1) FINISH, FenceVdsVDSCommand, log id: 24f33bda
>>
>>
>
>Looks like this bug:
>
> https://bugzilla.redhat.com/1114977
Indeed it is. So I looked at the host to see what the failure was and
I get the following messages. It looks like engine is not passing the
contents of the 'Slot' UI field as the port option. This, even after
I changed the param mapping like so:
engine-config -s CustomVdsFenceOptionMapping="xxxvirt:address=ip,username=username,password=password,slot=port"
Thread-440::DEBUG::2014-07-15 15:06:46,997::API::1165::vds::(fenceNode) fenceNode(addr=192.168.2.101,port=,agent=virsh,user=root,passwd=XXXX,action=status,secure=,options==block-cascade)
Thread-440::DEBUG::2014-07-15 15:06:46,997::utils::594::root::(execCmd) /usr/sbin/fence_virsh (cwd None)
Thread-440::DEBUG::2014-07-15 15:06:47,035::utils::614::root::(execCmd) FAILED: <err> = "WARNING:root:Parse error: Ignoring unknown option '=block-cascade'\n\nERROR:root:Failed: You have to enter plug number or machine identification\n\nERROR:root:Please use '-h' for usage\n\n"; <rc> = 1
Thread-440::DEBUG::2014-07-15 15:06:47,035::API::1152::vds::(fence) rc 1 inp agent=fence_virsh
ipaddr=192.168.2.101
login=root
action=status
passwd=XXXX
=block-cascade out [] err ["WARNING:root:Parse error: Ignoring unknown option '=block-cascade'", '', 'ERROR:root:Failed: You have to enter plug number or machine identification', '', "ERROR:root:Please use '-h' for usage", '']
Thread-440::DEBUG::2014-07-15 15:06:47,035::API::1188::vds::(fenceNode) rc 1 in agent=fence_virsh
ipaddr=192.168.2.101
login=root
action=status
passwd=XXXX
=block-cascade out [] err ["WARNING:root:Parse error: Ignoring unknown option '=block-cascade'", '', 'ERROR:root:Failed: You have to enter plug number or machine identification', '', "ERROR:root:Please use '-h' for usage", '']
>
>--
>Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta
>3ºD, 28016 Madrid, Spain
>Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat S.L.
--
Adam Litke
More information about the Devel
mailing list