Subject: | Async option and username/password error |
Distribution: Net::OpenSSH VERSION = '0.45'
Perl version: v5.10.0
OS: Linux dev-admin100.dht.corp.sk1.yahoo.com 2.6.18-164.2.1.el5 #1 SMP
Mon Sep 21 04:37:42 EDT 2009 x86_64
=======
Thanks for your module, it works very well. I've tried the other
distributions, and this one is very easy to install.
I've run into what may be an edge-case.
Bug Description: I am using Net::OpenSSH object with "async => 1". If
user and password are supplied, this will work if there is a single
Net::OpenSSH instance. If there are multiple instances launched
simultaneously (e.g. 3), then this doesn't work.
I am not sure if this works _sometimes_ (i.e. a race condition). I
thought that it worked once, but I couldn't get it to work again
(it seemed to always fail). So it's possible this is either a
race, or always fails (in any case it mostly fails for me). Failure
means that:
$ready = $ssh->wait_for_master (1);
# Never returns $ready == true, when error occurs
I am using AnyEvent and Coros to handle async behavior and this works
flawlessly without passwords (i.e. any passwordless SSH setup like
'publickey'). I can simultaneously launch up to 10 SSH fine (before
hitting the MAX unauth limit). The exact same code path works fine
when user/pw is set and async => 0.
Also note that if I give the wrong password, the code seems to fail
silently when async => 1 (i.e. $error does not give a non-zero
answer when tested immediately after wait_for_master).