Skip to content
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 paramiko chan.recv_exit_status() call order #313

Merged

Conversation

floatingstatic
Copy link
Contributor

commands.remote_command hangs when receiving a large amount of output. This appears to be an ordering problem when chan.recv_exit_status() is called before doing a read.

This is ultimately a paramiko problem, discussed in this issue: paramiko/paramiko#448

And this warning in the channel code that was the result of the paramiko issue linked above indicates that chan.recv_exit_status() should be called after a read: https://github.com/paramiko/paramiko/blob/cf7d49d66f3b1fbc8b0853518a54050182b3b5eb/paramiko/channel.py#L387-L396

The patch in this PR resolves hanging I have experienced when dumping large routing table output from a network host running BIRD using commands.remote_command in nornir.

@dbarrosop dbarrosop merged commit a310775 into nornir-automation:develop Jan 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants