From 91149eda98cc729988af3e74b6ef279e97bfb982 Mon Sep 17 00:00:00 2001 From: Nikita Konovalov Date: Tue, 3 Mar 2015 16:21:39 +0300 Subject: [PATCH] [Sahara] added a cluster delete timeout Large clusters need some time to terminate correctly. Config added for delete operation. Also the create operation default timeout increased. Change-Id: I025efe6630ea895f54288a183c4397b6223a814f --- etc/rally/rally.conf.sample | 5 ++++- rally/benchmark/scenarios/sahara/utils.py | 11 ++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/etc/rally/rally.conf.sample b/etc/rally/rally.conf.sample index a8a5cc6378..5ae3fe2c00 100644 --- a/etc/rally/rally.conf.sample +++ b/etc/rally/rally.conf.sample @@ -330,7 +330,10 @@ #nova_server_migrate_poll_interval = 2.0 # A timeout in seconds for a cluster create operation (integer value) -#cluster_create_timeout = 600 +#cluster_create_timeout = 1800 + +# A timeout in seconds for a cluster delete operation (integer value) +#cluster_delete_timeout = 900 # Cluster status polling interval in seconds (integer value) #cluster_check_interval = 5 diff --git a/rally/benchmark/scenarios/sahara/utils.py b/rally/benchmark/scenarios/sahara/utils.py index 4219943701..57f4b76874 100644 --- a/rally/benchmark/scenarios/sahara/utils.py +++ b/rally/benchmark/scenarios/sahara/utils.py @@ -29,8 +29,10 @@ LOG = logging.getLogger(__name__) CONF = cfg.CONF SAHARA_TIMEOUT_OPTS = [ - cfg.IntOpt("cluster_create_timeout", default=600, + cfg.IntOpt("cluster_create_timeout", default=1800, help="A timeout in seconds for a cluster create operation"), + cfg.IntOpt("cluster_delete_timeout", default=900, + help="A timeout in seconds for a cluster delete operation"), cfg.IntOpt("cluster_check_interval", default=5, help="Cluster status polling interval in seconds"), cfg.IntOpt("job_execution_timeout", default=600, @@ -467,8 +469,11 @@ class SaharaScenario(base.Scenario): """ self.clients("sahara").clusters.delete(cluster.id) - bench_utils.wait_for(resource=cluster.id, - is_ready=self._is_cluster_deleted) + bench_utils.wait_for( + resource=cluster.id, + timeout=CONF.benchmark.cluster_delete_timeout, + check_interval=CONF.benchmark.cluster_check_interval, + is_ready=self._is_cluster_deleted) def _is_cluster_deleted(self, cl_id): try: