[ovirt-users] Re: fence_xvm for testing

2020-12-17 Thread emesika
On Tue, Dec 15, 2020 at 1:59 PM Alex K  wrote:

>
>
> On Tue, Dec 15, 2020 at 1:43 PM emesika  wrote:
>
>> The problem is that the custom fencing configuration is not defined well
>>
>> Please follow [1] and retry
>>
>> [1]
>> https://www.ovirt.org/develop/developer-guide/engine/custom-fencing.html
>>
> Yes, I followed that.
> I cannot see what I am missing:
>
> [root@manager ~]# engine-config -g CustomVdsFenceType
> CustomVdsFenceType: fence_xvm version: general
>
should be only xvm

> [root@manager ~]# engine-config -g CustomFenceAgentMapping
> CustomFenceAgentMapping: fence_xvm=xvm version: general
>
Not needed , please keep empty

> [root@manager ~]# engine-config -g CustomVdsFenceOptionMapping
> CustomVdsFenceOptionMapping: fence_xvm: version: general
>
this one seems not OK , you should list here all options for the agent ,
please check the doc again

>
>
>>
>> On Tue, Dec 15, 2020 at 12:56 PM Alex K  wrote:
>>
>>>
>>>
>>> On Tue, Dec 15, 2020 at 12:34 PM Martin Perina 
>>> wrote:
>>>
>>>>
>>>>
>>>> On Tue, Dec 15, 2020 at 11:18 AM Alex K 
>>>> wrote:
>>>>
>>>>>
>>>>>
>>>>> On Tue, Dec 15, 2020 at 11:59 AM Martin Perina 
>>>>> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> could you please provide engine.log? And also vdsm.log from a host
>>>>>> which was acting as a fence proxy?
>>>>>>
>>>>>
>>>>> At proxy host (kvm1) I see the following vdsm.log:
>>>>>
>>>>> 2020-12-15 10:13:03,933+ INFO  (jsonrpc/0) [jsonrpc.JsonRpcServer]
>>>>> RPC call Host.fenceNode failed (error 1) in 0.01 seconds (__init__:312)
>>>>> 2020-12-15 10:13:04,376+ INFO  (jsonrpc/7) [jsonrpc.JsonRpcServer]
>>>>> RPC call Host.fenceNode failed (error 1) in 0.01 seconds (__init__:312)
>>>>>
>>>>
>>>> Isn't there stdout and stderr content of fence_xvm execution a few
>>>> lines above, which should reveal the exact error? If not, then could you
>>>> please turn on debug logging using below command:
>>>>
>>>> vdsm-client Host setLogLevel level=DEBUG
>>>>
>>>> This should be executed on the host which acts as a fence proxy (if you 
>>>> have multiple hosts, then you would need to turn on debug on all, because 
>>>> the fence proxy is selected randomly).
>>>>
>>>> Once we will have vdsm.log with fence_xvm execution details, then you can 
>>>> change log level to INFO again by running:
>>>>
>>>> I had to set engine-config -s CustomFenceAgentMapping="fence_xvm=xvm"
>>> at engine, as it seems the host prepends fence_.
>>> After that I got the following at the proxy host with DEBUG enabled:
>>>
>>> 2020-12-15 10:51:57,891+ DEBUG (jsonrpc/7) [jsonrpc.JsonRpcServer]
>>> Calling 'Host.fenceNode' in bridge with {u'username': u'root', u'addr':
>>> u'225.0.0.12', u'agent': u'xvm', u'options': u'port=ovirt-node0',
>>> u'action': u'status', u'password': '', u'port': u'0'} (__init__:329)
>>> 2020-12-15 10:51:57,892+ DEBUG (jsonrpc/7) [root] /usr/bin/taskset
>>> --cpu-list 0-3 /usr/sbin/fence_xvm (cwd None) (commands:198)
>>> 2020-12-15 10:51:57,911+ INFO  (jsonrpc/7) [jsonrpc.JsonRpcServer]
>>> RPC call Host.fenceNode failed (error 1) in 0.02 seconds (__init__:312)
>>> 2020-12-15 10:51:58,339+ DEBUG (jsonrpc/5) [jsonrpc.JsonRpcServer]
>>> Calling 'Host.fenceNode' in bridge with {u'username': u'root', u'addr':
>>> u'225.0.0.12', u'agent': u'xvm', u'options': u'port=ovirt-node0',
>>> u'action': u'status', u'password': '', u'port': u'0'} (__init__:329)
>>> 2020-12-15 10:51:58,340+ DEBUG (jsonrpc/5) [root] /usr/bin/taskset
>>> --cpu-list 0-3 /usr/sbin/fence_xvm (cwd None) (commands:198)
>>> 2020-12-15 10:51:58,356+ INFO  (jsonrpc/5) [jsonrpc.JsonRpcServer]
>>> RPC call Host.fenceNode failed (error 1) in 0.01 seconds (__init__:312
>>>
>>> while at engine at got:
>>> 2020-12-15 10:51:57,873Z INFO
>>>  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector]
>>> (default task-5) [a4f30921-37a9-45c1-97e5-26152f844d72] EVENT_ID:
>>> FENCE_OPERATION_USING_AGENT_AND_PROXY_STARTED(9,020), Executing power
>>> management status on Host kvm0.lab.local using Proxy Host kvm1.lab.local
>>> and Fen

[ovirt-users] Re: fence_xvm for testing

2020-12-15 Thread emesika
The problem is that the custom fencing configuration is not defined well

Please follow [1] and retry

[1] https://www.ovirt.org/develop/developer-guide/engine/custom-fencing.html


On Tue, Dec 15, 2020 at 12:56 PM Alex K  wrote:

>
>
> On Tue, Dec 15, 2020 at 12:34 PM Martin Perina  wrote:
>
>>
>>
>> On Tue, Dec 15, 2020 at 11:18 AM Alex K  wrote:
>>
>>>
>>>
>>> On Tue, Dec 15, 2020 at 11:59 AM Martin Perina 
>>> wrote:
>>>
 Hi,

 could you please provide engine.log? And also vdsm.log from a host
 which was acting as a fence proxy?

>>>
>>> At proxy host (kvm1) I see the following vdsm.log:
>>>
>>> 2020-12-15 10:13:03,933+ INFO  (jsonrpc/0) [jsonrpc.JsonRpcServer]
>>> RPC call Host.fenceNode failed (error 1) in 0.01 seconds (__init__:312)
>>> 2020-12-15 10:13:04,376+ INFO  (jsonrpc/7) [jsonrpc.JsonRpcServer]
>>> RPC call Host.fenceNode failed (error 1) in 0.01 seconds (__init__:312)
>>>
>>
>> Isn't there stdout and stderr content of fence_xvm execution a few lines
>> above, which should reveal the exact error? If not, then could you please
>> turn on debug logging using below command:
>>
>> vdsm-client Host setLogLevel level=DEBUG
>>
>> This should be executed on the host which acts as a fence proxy (if you have 
>> multiple hosts, then you would need to turn on debug on all, because the 
>> fence proxy is selected randomly).
>>
>> Once we will have vdsm.log with fence_xvm execution details, then you can 
>> change log level to INFO again by running:
>>
>> I had to set engine-config -s CustomFenceAgentMapping="fence_xvm=xvm" at
> engine, as it seems the host prepends fence_.
> After that I got the following at the proxy host with DEBUG enabled:
>
> 2020-12-15 10:51:57,891+ DEBUG (jsonrpc/7) [jsonrpc.JsonRpcServer]
> Calling 'Host.fenceNode' in bridge with {u'username': u'root', u'addr':
> u'225.0.0.12', u'agent': u'xvm', u'options': u'port=ovirt-node0',
> u'action': u'status', u'password': '', u'port': u'0'} (__init__:329)
> 2020-12-15 10:51:57,892+ DEBUG (jsonrpc/7) [root] /usr/bin/taskset
> --cpu-list 0-3 /usr/sbin/fence_xvm (cwd None) (commands:198)
> 2020-12-15 10:51:57,911+ INFO  (jsonrpc/7) [jsonrpc.JsonRpcServer] RPC
> call Host.fenceNode failed (error 1) in 0.02 seconds (__init__:312)
> 2020-12-15 10:51:58,339+ DEBUG (jsonrpc/5) [jsonrpc.JsonRpcServer]
> Calling 'Host.fenceNode' in bridge with {u'username': u'root', u'addr':
> u'225.0.0.12', u'agent': u'xvm', u'options': u'port=ovirt-node0',
> u'action': u'status', u'password': '', u'port': u'0'} (__init__:329)
> 2020-12-15 10:51:58,340+ DEBUG (jsonrpc/5) [root] /usr/bin/taskset
> --cpu-list 0-3 /usr/sbin/fence_xvm (cwd None) (commands:198)
> 2020-12-15 10:51:58,356+ INFO  (jsonrpc/5) [jsonrpc.JsonRpcServer] RPC
> call Host.fenceNode failed (error 1) in 0.01 seconds (__init__:312
>
> while at engine at got:
> 2020-12-15 10:51:57,873Z INFO
>  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector]
> (default task-5) [a4f30921-37a9-45c1-97e5-26152f844d72] EVENT_ID:
> FENCE_OPERATION_USING_AGENT_AND_PROXY_STARTED(9,020), Executing power
> management status on Host kvm0.lab.local using Proxy Host kvm1.lab.local
> and Fence Agent xvm:225.0.0.12.
> 2020-12-15 10:51:57,888Z INFO
>  [org.ovirt.engine.core.vdsbroker.vdsbroker.FenceVdsVDSCommand] (default
> task-5) [a4f30921-37a9-45c1-97e5-26152f844d72] START,
> FenceVdsVDSCommand(HostName = kvm1.lab.local,
> FenceVdsVDSCommandParameters:{hostId='91c81bbe-5933-4ed0-b9c5-2c8c277e44c7',
> targetVdsId='b5e8fe3d-cbea-44cb-835a-f88d6d70c163', action='STATUS',
> agent='FenceAgent:{id='null', hostId='null', order='1', type='xvm',
> ip='225.0.0.12', port='0', user='root', password='***',
> encryptOptions='false', options='port=ovirt-node0'}', policy='null'}), log
> id: e6d3e8c
> 2020-12-15 10:51:58,008Z WARN
>  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector]
> (default task-5) [a4f30921-37a9-45c1-97e5-26152f844d72] EVENT_ID:
> VDS_ALERT_FENCE_TEST_FAILED(9,001), Power Management test failed for Host
> kvm0.lab.local.Internal JSON-RPC error
> 2020-12-15 10:51:58,008Z INFO
>  [org.ovirt.engine.core.vdsbroker.vdsbroker.FenceVdsVDSCommand] (default
> task-5) [a4f30921-37a9-45c1-97e5-26152f844d72] FINISH, FenceVdsVDSCommand,
> return: FenceOperationResult:{status='ERROR', powerStatus='UNKNOWN',
> message='Internal JSON-RPC error'}, log id: e6d3e8c
> 2020-12-15 10:51:58,133Z WARN
>  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector]
> (default task-5) [a4f30921-37a9-45c1-97e5-26152f844d72] EVENT_ID:
> FENCE_OPERATION_USING_AGENT_AND_PROXY_FAILED(9,021), Execution of power
> management status on Host kvm0.lab.local using Proxy Host kvm1.lab.local
> and Fence Agent xvm:225.0.0.12 failed.
> 2020-12-15 10:51:58,134Z WARN
>  [org.ovirt.engine.core.bll.pm.FenceAgentExecutor] (default task-5)
> [a4f30921-37a9-45c1-97e5-26152f844d72] Fence action failed using proxy host
> 'kvm1.lab.local', trying another