[ClusterLabs] fence_vbox Unable to connect/login to fencing device

ArekW arkaduis at gmail.com
Fri Jul 7 07:45:59 EDT 2017


The reason for --force is:
Error: missing required option(s): 'ipaddr, login, plug' for resource type:
stonith:fence_vbox (use --force to override)

I have selinux disabled on both nodes:
[root at nfsnode1 ~]# cat /etc/sysconfig/selinux
SELINUX=disabled

pcs stonith update vbox-fencing verbose=true
Error: resource option(s): 'verbose', are not recognized for resource type:
'stonith::fence_vbox' (use --force to override)
It worked with --force:

Jul  7 13:37:49 nfsnode1 fence_vbox: Unable to connect/login to fencing
device
Jul  7 13:37:49 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4765]
stderr: [ Running command: /usr/bin/ssh -4  AW23321 at 10.0.2.2 -i
/root/.ssh/id_rsa -p 22 -t '/bin/bash -c "PS1=\\[EXPECT\\]#\  /bin/bash
--noprofile --norc"' ]
Jul  7 13:37:49 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4765]
stderr: [ Timeout exceeded in read_nonblocking(). ]
Jul  7 13:37:49 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4765]
stderr: [ <fencing.fspawn object at 0x7f882e3c3d50> ]
Jul  7 13:37:49 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4765]
stderr: [ version: 2.3 ($Revision: 399 $) ]
Jul  7 13:37:49 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4765]
stderr: [ command: /usr/bin/ssh ]
Jul  7 13:37:49 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4765]
stderr: [ args: ['/usr/bin/ssh', '-4', 'AW23321 at 10.0.2.2', '-i',
'/root/.ssh/id_rsa', '-p', '22', '-t', '/bin/bash -c
"PS1=\\\\[EXPECT\\\\]#\\  /bin/bash --noprofile --norc"'] ]
Jul  7 13:37:49 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4765]
stderr: [ searcher: searcher_re: ]
Jul  7 13:37:49 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4765]
stderr: [     0: re.compile("Enter passphrase for key
'/root/.ssh/id_rsa':") ]
Jul  7 13:37:49 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4765]
stderr: [     1: re.compile("Are you sure you want to continue connecting
(yes/no)?") ]
Jul  7 13:37:49 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4765]
stderr: [     2: re.compile("\[EXPECT\]#\ ") ]
Jul  7 13:37:49 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4765]
stderr: [ buffer (last 100 chars):  ]
Jul  7 13:37:49 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4765]
stderr: [ before (last 100 chars):  ]
Jul  7 13:37:49 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4765]
stderr: [ after: <class 'pexpect.TIMEOUT'> ]
Jul  7 13:37:49 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4765]
stderr: [ match: None ]
Jul  7 13:37:49 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4765]
stderr: [ match_index: None ]
Jul  7 13:37:49 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4765]
stderr: [ exitstatus: None ]
Jul  7 13:37:49 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4765]
stderr: [ flag_eof: False ]
Jul  7 13:37:49 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4765]
stderr: [ pid: 4779 ]
Jul  7 13:37:49 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4765]
stderr: [ child_fd: 5 ]
Jul  7 13:37:49 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4765]
stderr: [ closed: False ]
Jul  7 13:37:49 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4765]
stderr: [ timeout: 30 ]
Jul  7 13:37:49 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4765]
stderr: [ delimiter: <class 'pexpect.EOF'> ]
Jul  7 13:37:49 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4765]
stderr: [ logfile: None ]
Jul  7 13:37:49 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4765]
stderr: [ logfile_read: None ]
Jul  7 13:37:49 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4765]
stderr: [ logfile_send: None ]
Jul  7 13:37:49 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4765]
stderr: [ maxread: 2000 ]
Jul  7 13:37:49 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4765]
stderr: [ ignorecase: False ]
Jul  7 13:37:49 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4765]
stderr: [ searchwindowsize: None ]
Jul  7 13:37:49 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4765]
stderr: [ delaybeforesend: 0.05 ]
Jul  7 13:37:49 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4765]
stderr: [ delayafterclose: 0.1 ]
Jul  7 13:37:49 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4765]
stderr: [ delayafterterminate: 0.1 ]
Jul  7 13:37:49 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4765]
stderr: [ Unable to connect/login to fencing device ]
Jul  7 13:37:49 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4765]
stderr: [  ]
Jul  7 13:37:49 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4765]
stderr: [  ]
Jul  7 13:37:50 nfsnode1 fence_vbox: Running command: /usr/bin/ssh -4
AW23321 at 10.0.2.2 -i /root/.ssh/id_rsa -p 22 -t '/bin/bash -c
"PS1=\\[EXPECT\\]#\  /bin/bash --noprofile --norc"'
Jul  7 13:37:53 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4984]
stderr: [ Running command: /usr/bin/ssh -4  AW23321 at 10.0.2.2 -i
/root/.ssh/id_rsa -p 22 -t '/bin/bash -c "PS1=\\[EXPECT\\]#\  /bin/bash
--noprofile --norc"' ]
Jul  7 13:37:53 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4984]
stderr: [ Received: [EXPECT]#  ]
Jul  7 13:37:53 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4984]
stderr: [ Sent: /cygdrive/c/Program\ Files/Oracle/VirtualBox/VBoxManage
list vms ]
Jul  7 13:37:53 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4984]
stderr: [  ]
Jul  7 13:37:53 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4984]
stderr: [ Received: /cygdrive/c/Program\ Files/Oracle/VirtualBox/VBoxManage
list vms#015 ]
Jul  7 13:37:53 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4984]
stderr: [ "centos1" {03991a96-bbdc-4a8d-8123-298e41c24342}#015#015 ]
Jul  7 13:37:53 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4984]
stderr: [ "centos2" {f7eb05e5-7cfb-4ef3-a97f-e6cafa612b0f}#015#015 ]
Jul  7 13:37:53 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4984]
stderr: [ "CentOSTest1" {75f0f309-28ea-4314-9d87-9227d78ab8c0}#015#015 ]
Jul  7 13:37:53 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4984]
stderr: [ "CentOSTest2" {d99df7ee-9a2e-4c2a-ac4a-902a56055d15}#015#015 ]
Jul  7 13:37:53 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4984]
stderr: [ [EXPECT]#  ]
Jul  7 13:37:53 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4984]
stderr: [ Sent: /cygdrive/c/Program\ Files/Oracle/VirtualBox/VBoxManage
list runningvms ]
Jul  7 13:37:53 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4984]
stderr: [  ]
Jul  7 13:37:53 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4984]
stderr: [ Received: #015< Files/Oracle/VirtualBox/VBoxManage list
runningvms#015 ]
Jul  7 13:37:53 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4984]
stderr: [ "centos1" {03991a96-bbdc-4a8d-8123-298e41c24342}#015#015 ]
Jul  7 13:37:53 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4984]
stderr: [ "centos2" {f7eb05e5-7cfb-4ef3-a97f-e6cafa612b0f}#015#015 ]
Jul  7 13:37:53 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4984]
stderr: [ [EXPECT]#  ]
Jul  7 13:37:53 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4984]
stderr: [ Sent: quit ]
Jul  7 13:37:53 nfsnode1 stonith-ng[2045]: warning: fence_vbox[4984]
stderr: [  ]

It seems like there is has some problem but eventually it gets runningvms.
What does it mean?

Pozdrawiam,
Arek

2017-07-07 10:25 GMT+02:00 Oyvind Albrigtsen <oalbrigt at redhat.com>:

> On 07/07/17 10:07 +0200, Marek Grac wrote:
>
>> Hi,
>>
>> On Fri, Jul 7, 2017 at 8:02 AM, ArekW <arkaduis at gmail.com> wrote:
>>
>> Hi,
>>> I did a small research on the scripts
>>>
>>> /usr/sbin/fence_vbox
>>> def main():
>>> ...
>>> conn = fence_login(options)
>>>
>>> The fence_loging is scripted in the fencing.py and it should invoke
>>> function: _login_ssh_with_identity_file
>>>
>>> /usr/share/fence/fencing.py
>>> def _login_ssh_with_identity_file:
>>> ...
>>> command = '%s %s %s@%s -i %s -p %s' % \
>>>                 (options["--ssh-path"], force_ipvx,
>>> options["--username"],
>>> options["--ip"], \
>>>                 options["--identity-file"], options["--ipport"])
>>>
>>> There are username and ip parameter used here (not login and ipaddr as in
>>> fence description) so I used:
>>>
>>>
>> You have noticed this right, this is due to backward compatibility. And we
>> are working towards ability to use command-line options everywhere (it is
>> already in upstream but it is not yet supported in pcs).
>>
>> So 'login=FOO' is same as '--username FOO/-l FOO'. Misleading at least.
>> The
>> mapping between those systems was available on our wiki pages, it is
>> available in documentation and in (somewhat less readable way) in manual
>> page.
>>
> You can run "fence_vbox -o metadata" to see what the different
> parameters are named.
>
>
>>
>>
>>
>>> pcs stonith create vbox-fencing fence_vbox ip=10.0.2.2 username=AW23321
>>> identity_file=/root/.ssh/id_rsa host_os=windows
>>> vboxmanage_path="/cygdrive/c/Program\ Files/Oracle/VirtualBox/VBoxMa
>>> nage"
>>> pcmk_host_map="nfsnode1:centos1;nfsnode2:centos2" ssh=true
>>> inet4_only=true op monitor interval=5 -force
>>>
>>>
>> * Why are you using -force?
>>
>> * ssh=true is not a valid option (=> it is ignored and warning should be
>> in
>> the logs) and fence_vbox can use ssh only. [secure=true will do what you
>> want]
>>
>>
>>
>>
>>> I still got the same warning in messages:
>>> Jul  7 07:52:24 nfsnode1 stonith-ng[6244]: warning: fence_vbox[21564]
>>> stderr: [ Unable to connect/login to fencing device ]
>>> Jul  7 07:52:24 nfsnode1 stonith-ng[6244]: warning: fence_vbox[21564]
>>> stderr: [  ]
>>> Jul  7 07:52:24 nfsnode1 stonith-ng[6244]: warning: fence_vbox[21564]
>>> stderr: [  ]
>>>
>>> "Standalone" test is working with the same parameters:
>>> [root at nfsnode1 nfsinfo]# fence_vbox --ip 10.0.2.2 --username=AW23321
>>> --identity-file=/root/.ssh/id_rsa --plug=centos2 --host-os=windows
>>> --action=status --vboxmanage-path="/cygdrive/c/Program\
>>> Files/Oracle/VirtualBox/VBoxManage" -4 -x
>>> Status: ON
>>>
>>>
>> This looks like SELinux for me. From the command line, you are in
>> unconfined domain so no checks are performed. Try to look at SELinux
>> boolean "fenced_can_ssh"
>>
>>
>> I could use more debug in the scripts.
>>>
>>> You can use verbose=true (-v) and it will display all input/output
>> operations. In case of the fence_vbox you will see what we attempt to run
>> and what is the output of these commands. If there is need for more detail
>> output, please let me know and I will try to add it.
>>
>> m,
>>
>
> _______________________________________________
>> Users mailing list: Users at clusterlabs.org
>> http://lists.clusterlabs.org/mailman/listinfo/users
>>
>> Project Home: http://www.clusterlabs.org
>> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
>> Bugs: http://bugs.clusterlabs.org
>>
>
>
> _______________________________________________
> Users mailing list: Users at clusterlabs.org
> http://lists.clusterlabs.org/mailman/listinfo/users
>
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/users/attachments/20170707/7023936d/attachment-0003.html>


More information about the Users mailing list