Fix Tester cleanup crashes rally execution

Cleanup now executes in separate process and waits for cleanup to finish.

Fixes bug 1231338

Change-Id: I466a00dd84dc991a2a806e2c1491efedf7098e7e
This commit is contained in:
Evgeniy 2013-09-26 12:32:44 +02:00
parent fcfec667bd
commit 9b2d8cc883

View File

@ -62,6 +62,11 @@ def _run_test(args):
'proc_name': proc_n}
def _run_cleanup(config):
os.environ['CUSTOM_FUEL_CONFIG'] = config
fuel_cleanup.cleanup()
class Tester(object):
def __init__(self, cloud_config_path, test_config_path=None):
@ -135,5 +140,8 @@ class Tester(object):
return results
def _cleanup(self, cloud_config_path):
os.environ['CUSTOM_FUEL_CONFIG'] = cloud_config_path
fuel_cleanup.cleanup()
cleanup = multiprocessing.Process(target=_run_cleanup,
args=(cloud_config_path,))
cleanup.start()
cleanup.join()
return