Update stress tests to properly use tempest.config
When tempest.config was switched over to using oslo the stress tests
weren't updated with those changes. Also subsequent changes to the
tempest options were not updated in the stress test suite. This left
the stress tests unusable because it couldn't get the needed
information from config. This commit updates the stress test suite
to properly use tempest.config. It also adds a new section to the
config file for stress test specific options.
Fixes bug 1133012
Change-Id: I1b0c726f53dc0e3e0777e27af3e860d35029f958
diff --git a/stress/driver.py b/stress/driver.py
index 8dc88cf..f80e765 100644
--- a/stress/driver.py
+++ b/stress/driver.py
@@ -18,6 +18,7 @@
import datetime
import random
import time
+from urlparse import urlparse
from config import StressConfig
from state import ClusterState
@@ -162,7 +163,7 @@
(default: 32)
`seed` = random seed (default: None)
"""
- stress_config = StressConfig(manager.config._conf)
+ stress_config = StressConfig(manager.config)
# get keyword arguments
duration = kwargs.get('duration', datetime.timedelta(seconds=10))
seed = kwargs.get('seed', None)
@@ -173,7 +174,8 @@
keypath = stress_config.host_private_key_path
user = stress_config.host_admin_user
logdir = stress_config.nova_logdir
- computes = _get_compute_nodes(keypath, user, manager.config.identity.host)
+ host = urlparse(manager.config.identity.uri).hostname
+ computes = _get_compute_nodes(keypath, user, host)
stress.utils.execute_on_all(keypath, user, computes,
"rm -f %s/*.log" % logdir)
random.seed(seed)