[openstack-dev] [Rally]Rally exception

Harshil Shah (harsshah) harsshah at cisco.com
Mon Sep 29 21:20:11 UTC 2014


I ran into below rally exception while trying to run Rally scenario.

 u'Traceback (most recent call last):\n  File "/home/localadmin/openstack/cvg_rally/rally/rally/benchmark/runners/base.py", line 73, in _run_scenario_once\n    method_name)(**kwargs) or scenario_output\n  File "/home/localadmin/openstack/cvg_rally/rally/rally/benchmark/scenarios/vm_int/vm_perf.py", line 139, in boot_runperf_delete\n    self.server.dispose()\n  File "/home/localadmin/openstack/cvg_rally/rally/rally/benchmark/scenarios/vm_int/IperfInstance.py", line 68, in dispose\n    Instance.dispose(self)\n  File "/home/localadmin/openstack/cvg_rally/rally/rally/benchmark/scenarios/vm_int/instance.py", line 96, in dispose\n    self.ssh_instance.close()\n  File "/home/localadmin/openstack/cvg_rally/rally/rally/sshutils.py", line 136, in close\n    self._client.close()\nAttributeError: \'bool\' object has no attribute \'close\'\n'],

Looking at the code this how close() is written.
===== rally/sshutils.py====
135     def close(self):
136         self._client.close()
137         self._client = False

 85      def __init__(self, user, host, port=22, pkey=None,
 86                  key_filename=None, password=None):
 87         """Initialize SSH client.
 88
 89         :param user: ssh username
 90         :param host: hostname or ip address of remote ssh server
 91         :param port: remote ssh port
 92         :param pkey: RSA or DSS private key string or file object
 93         :param key_filename: private key filename
 94         :param password: password
 95
 96         """
 97
 98         self.user = user
 99         self.host = host
100         self.port = port
101         self.pkey = self._get_pkey(pkey) if pkey else None
102         self.password = password
103         self.key_filename = key_filename
104         self._client = False

======================

This object _client is used at boolean and in above code its trying to invoke a method on it, so its this intentional. If not is this a known issue ?

Thanks,
Harshil

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140929/c9407eec/attachment.html>


More information about the OpenStack-dev mailing list