commit | 690bae27c8df1a9c04ae0c0555e30db50c27c691 | [log] [tgz] |
---|---|---|
author | Gregory Thiemonge <gthiemon@redhat.com> | Wed Nov 20 11:33:56 2019 +0100 |
committer | Gregory Thiemonge <gthiemon@redhat.com> | Wed Nov 20 11:38:44 2019 +0100 |
tree | e3c0e1d2e4edbd34232d10412a8d02ca6e946d48 | |
parent | ce2ae85469abf600467ea8f82d29a3bc868fabe9 [diff] |
Close ssh client after executing a command Each time ssh.Client.exec_command is called, _get_ssh_connection creates a new SSHClient instance. If this instance is not closed after command execution, it might cause a shortage of resources on the host (many open sockets, and dropbear processes in a cirros VM). This commit closes ssh client after processing the remote command. Closes-Bug: #1853264 Change-Id: If77f401d6d4a1282ce31a31bbd8827db34690e52