From 9b2d8cc883e2d9da9daeaa72d77f605fad939851 Mon Sep 17 00:00:00 2001 From: Evgeniy Date: Thu, 26 Sep 2013 12:32:44 +0200 Subject: [PATCH] Fix Tester cleanup crashes rally execution Cleanup now executes in separate process and waits for cleanup to finish. Fixes bug 1231338 Change-Id: I466a00dd84dc991a2a806e2c1491efedf7098e7e --- rally/benchmark/utils.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/rally/benchmark/utils.py b/rally/benchmark/utils.py index 5231dd429e..a7f85cdc0d 100644 --- a/rally/benchmark/utils.py +++ b/rally/benchmark/utils.py @@ -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