-
Task
-
Resolution: Done
-
Undefined
-
None
-
None
-
None
-
False
-
-
False
-
-
Related to
- https://github.com/ansible/pylibssh/issues/208
- nxos_vlans results in command_timeout with libssh ansible-collections/cisco.nxos#145
- The above issue is caused because pylibssh takes ~300 times longer than paramiko to read the output of show vlan | json from the same target device. This resulted in the command_timeout value to work for paramiko but not libssh.
- This was realised by adding time.perf_counter() in relevant places within network_cli code as defined in this patch.
- Based on multiple passes, paramiko takes ~3 secs while pylibssh takes ~1000 secs to receive the same data.
- Data from one such pass is added here - https://gist.github.com/NilashishC/62cf8e945ac9a49e743fb2b553b8716d.
- On bumping the buffer size in read_non_blocking() to 8096 bytes and removing the upper cap of 1024 bytes, this delay was reduced to ~280 secs.