[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
This commit is contained in:
Nikita Konovalov 2015-03-03 16:21:39 +03:00
parent 814c02fa74
commit 91149eda98
2 changed files with 12 additions and 4 deletions

View File

@ -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

View File

@ -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: