Fix filedescriptor issue with VMTasks scenario.
VMTasks does not close ssh when it runs commands over ssh. The number of file descriptors increase over time during execution. Change-Id: I039fb7f8e504619cb3c1a88716942b0f6a8c6e08
This commit is contained in:
parent
09c040fa70
commit
996a7df22c
|
@ -223,5 +223,11 @@ class VMScenario(nova_utils.NovaScenario):
|
||||||
pkey = pkey if pkey else self.context["user"]["keypair"]["private"]
|
pkey = pkey if pkey else self.context["user"]["keypair"]["private"]
|
||||||
ssh = sshutils.SSH(username, server_ip, port=port,
|
ssh = sshutils.SSH(username, server_ip, port=port,
|
||||||
pkey=pkey, password=password)
|
pkey=pkey, password=password)
|
||||||
|
try:
|
||||||
self._wait_for_ssh(ssh, timeout, interval)
|
self._wait_for_ssh(ssh, timeout, interval)
|
||||||
return self._run_command_over_ssh(ssh, command)
|
return self._run_command_over_ssh(ssh, command)
|
||||||
|
finally:
|
||||||
|
try:
|
||||||
|
ssh.close()
|
||||||
|
except AttributeError:
|
||||||
|
pass
|
||||||
|
|
Loading…
Reference in New Issue