libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tomaz Muraus (JIRA)" <>
Subject [jira] [Commented] (LIBCLOUD-491) ParamikoSSHClient don't show stdout/stderr when run fast commands
Date Fri, 10 Jan 2014 14:05:52 GMT


Tomaz Muraus commented on LIBCLOUD-491:

Ugh, sorry about that.

It looks like my change fixed an issue with buffering and a lot of output (,
but broke it if you run a command which doesn't buffer a lot of output and exists almost immediately.

The good thing is that new approach is still more robust than the old one and I think can
also also make it work for your case which it broke.

Also, the thing which bothers me the most about this is that it's basically impossible to
write a unit test which reproduces all the edge cases with buffering, etc. For now, I have
been similarly as [~jc2k] relying on manual testing which is cumbersome and slow.

This basically means we need to figure out good and reliable way to make an integration test
for this. Sadly connecting to the external server is out of question, because it would make
tests easier to run locally and network can be unpredictable and this would make whole test
unpredictable which is not good.

> ParamikoSSHClient don't show stdout/stderr when run fast commands
> -----------------------------------------------------------------
>                 Key: LIBCLOUD-491
>                 URL:
>             Project: Libcloud
>          Issue Type: Bug
>            Reporter: Oleg Suharev
>            Priority: Critical
> Hello
> Commit a053cde create a big trouble in method. When I run 'fast'
commands (for example uname -a) this method doesn't return stdout/stderr, because code
> {code}
> while not chan.exit_status_ready():
>             if chan.recv_ready():
> {code}
> doesn't run since chan.exit_status_ready() already return True (in first call)
> [~kami] please fix this trouble.
> {code}
> In [1]: from libcloud.compute.ssh import SSHClient
> In [2]: client = SSHClient('123.123.321.321', key='/Users/user/mykey.pem')
> In [3]: client.connect()
> Out[3]: True
> In [4]:'uname -a')
> Out[4]: ['', '', 0]
> {code}

This message was sent by Atlassian JIRA

View raw message