New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a bug in consuming streams in Paramiko ssh client #558

Closed
wants to merge 2 commits into
base: trunk
from

Conversation

Projects
None yet
2 participants
@lakshmi-kannan
Contributor

lakshmi-kannan commented Aug 2, 2015

I wrote a wrapper to that wraps the SSH client to test. See lakshmi-kannan/st2#2 and specifically lakshmi-kannan/st2@1f0e025.

(virtualenv)/m/s/s/st2 git:paramiko_parallel_ssh ❯❯❯ st2common/bin/paramiko_ssh_evenlets_tester.py --hosts=localhost,127.0.0.1 --user=lakshmi --private-key="/home/vagrant/.ssh/id_rsa" --cmd="pwd"
"cmd results: \n{'127.0.0.1': [u'/home/lakshmi\\n', '', 0, True], 'localhost': [u'/home/lakshmi\\n', '', 0, True]}"
(virtualenv)/m/s/s/st2 git:paramiko_parallel_ssh ❯❯❯

lakshmi-kannan added some commits Aug 2, 2015

Consume stdout, stderr streams on exit_status_ready
* In some cases such as executing commands on localhost
via SSH, exit_status_ready gets set super fast. We don't
seem to consume them if this happens. The problem
manifest when you wrap the ParamikoSSHClient inside
something like an evenlet pool. This PR fixes that issue.

@asfgit asfgit closed this in c90d63d Aug 3, 2015

@Kami

This comment has been minimized.

Show comment
Hide comment
@Kami

Kami Aug 3, 2015

Member

Good catch. Merged into trunk. Thanks.

We probably never encountered this issue because we always used it with remote servers where a higher latency would mask this bug :)

Member

Kami commented Aug 3, 2015

Good catch. Merged into trunk. Thanks.

We probably never encountered this issue because we always used it with remote servers where a higher latency would mask this bug :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment