fix config file examples, houskeeping, etc
diff --git a/wally/run_test.py b/wally/run_test.py
index 487fd49..edf58fa 100755
--- a/wally/run_test.py
+++ b/wally/run_test.py
@@ -322,6 +322,7 @@
def get_OS_credentials(cfg, ctx):
creds = None
os_creds = None
+ force_insecure = False
if 'openstack' in cfg.clouds:
os_cfg = cfg.clouds['openstack']
@@ -340,6 +341,9 @@
os_cfg['OS_AUTH_URL'].strip(),
os_cfg.get('OS_INSECURE', False))
+ elif 'OS_INSECURE' in os_cfg:
+ force_insecure = os_cfg.get('OS_INSECURE', False)
+
if os_creds is None and 'fuel' in cfg.clouds and \
'openstack_env' in cfg.clouds['fuel'] and \
ctx.fuel_openstack_creds is not None:
@@ -352,6 +356,13 @@
if creds is None:
creds = os_creds
+ if force_insecure and not creds.insecure:
+ creds = start_vms.OSCreds(creds.name,
+ creds.passwd,
+ creds.tenant,
+ creds.auth_url,
+ True)
+
logger.debug(("OS_CREDS: user={0.name} tenant={0.tenant}" +
"auth_url={0.auth_url} insecure={0.insecure}").format(creds))
diff --git a/wally/suits/io/fio.py b/wally/suits/io/fio.py
index 777ae5f..c009c3d 100644
--- a/wally/suits/io/fio.py
+++ b/wally/suits/io/fio.py
@@ -442,8 +442,10 @@
cmd = "sudo " + cmd
zero_md5 = '0f343b0931126a20f133d67c2b018a3b'
- offsets = [random.randrange(size - 1024) for _ in range(num_blocks)]
- offsets.append(size - 1024)
+ bsize = size * (1024 ** 2)
+ offsets = [random.randrange(bsize - 1024) for _ in range(num_blocks)]
+ offsets.append(bsize - 1024)
+ offsets.append(0)
for offset in offsets:
data = rossh(cmd.format(fname, offset), nolog=True)
@@ -574,29 +576,33 @@
list(pool.map(fc, self.config.nodes))
def pre_run_th(self, node, files, force):
- # fill files with pseudo-random data
- rossh = run_on_node(node)
- rossh.connection = node.connection
-
try:
- cmd = 'mkdir -p "{0}"'.format(self.config.remote_dir)
- if self.use_sudo:
- cmd = "sudo " + cmd
- cmd += " ; sudo chown {0} {1}".format(node.get_user(),
- self.config.remote_dir)
- rossh(cmd, nolog=True)
+ # fill files with pseudo-random data
+ rossh = run_on_node(node)
+ rossh.connection = node.connection
- assert self.config.remote_dir != "" and self.config.remote_dir != "/"
- rossh("rm -rf {0}/*".format(self.config.remote_dir), nolog=True)
+ try:
+ cmd = 'mkdir -p "{0}"'.format(self.config.remote_dir)
+ if self.use_sudo:
+ cmd = "sudo " + cmd
+ cmd += " ; sudo chown {0} {1}".format(node.get_user(),
+ self.config.remote_dir)
+ rossh(cmd, nolog=True)
- except Exception as exc:
- msg = "Failed to create folder {0} on remote {1}. Error: {2!s}"
- msg = msg.format(self.config.remote_dir, node.get_conn_id(), exc)
- logger.exception(msg)
- raise StopTestError(msg, exc)
+ assert self.config.remote_dir != "" and self.config.remote_dir != "/"
+ rossh("rm -rf {0}/*".format(self.config.remote_dir), nolog=True)
- self.install_utils(node, rossh)
- self.prefill_test_files(rossh, files, force)
+ except Exception as exc:
+ msg = "Failed to create folder {0} on remote {1}. Error: {2!s}"
+ msg = msg.format(self.config.remote_dir, node.get_conn_id(), exc)
+ logger.exception(msg)
+ raise StopTestError(msg, exc)
+
+ self.install_utils(node, rossh)
+ self.prefill_test_files(rossh, files, force)
+ except:
+ logger.exception("XXXX")
+ raise
def show_test_execution_time(self):
if len(self.fio_configs) > 1: