summaryrefslogtreecommitdiffstats
path: root/docker
diff options
context:
space:
mode:
authormbeierl <mark.beierl@dell.com>2018-07-12 15:04:47 -0400
committermbeierl <mark.beierl@dell.com>2018-07-12 15:04:47 -0400
commit65f7a44701322be2217116368da8041b96da1250 (patch)
tree5f3c0dcecc6416547f0e514b052daa6acc356cf1 /docker
parent581281c3a950e537cf1573f9fa7eff8dc5572795 (diff)
Collect slave info
Adds the output of uname -a to the metadata for each slave. Additional information about each slave can also be added as needed in the future. Change-Id: Ifb3d06599c0f1b7a4ffe06a7c98b151e62ba7bd8 JIRA: STORPERF-253 Signed-off-by: mbeierl <mark.beierl@dell.com>
Diffstat (limited to 'docker')
-rw-r--r--docker/storperf-master/storperf/storperf_master.py13
-rw-r--r--docker/storperf-master/storperf/test_executor.py2
2 files changed, 14 insertions, 1 deletions
diff --git a/docker/storperf-master/storperf/storperf_master.py b/docker/storperf-master/storperf/storperf_master.py
index 4cd7071..877f878 100644
--- a/docker/storperf-master/storperf/storperf_master.py
+++ b/docker/storperf-master/storperf/storperf_master.py
@@ -24,6 +24,7 @@ from snaps.openstack.utils import heat_utils, cinder_utils, glance_utils
from snaps.thread_utils import worker_pool
from storperf.db.job_db import JobDB
from storperf.test_executor import TestExecutor
+import json
class ParameterError(Exception):
@@ -79,6 +80,7 @@ class StorPerfMaster(object):
self._block_sizes = [512, 4096, 16384]
self._workload_modules = []
self._custom_workloads = []
+ self.slave_info = {}
@property
def volume_count(self):
@@ -425,12 +427,14 @@ class StorPerfMaster(object):
params['public_network'] = self.public_network
params['volume_count'] = self.volume_count
params['volume_size'] = self.volume_size
+ params['agent_info'] = json.dumps(self.slave_info)
if self.volume_type is not None:
params['volume_type'] = self.volume_type
if self.username and self.password:
params['username'] = self.username
params['password'] = self.password
job_id = self._test_executor.execute(params)
+ self.slave_info = {}
return job_id
@@ -520,6 +524,11 @@ class StorPerfMaster(object):
key_filename='storperf/resources/ssh/storperf_rsa',
timeout=2)
+ uname = self._get_uname(ssh)
+ logger.debug("Slave uname is %s" % uname)
+ self.slave_info[slave] = {}
+ self.slave_info[slave]['uname'] = uname
+
available = self._check_root_fs(ssh)
logger.debug("Available space on / is %s" % available)
if available < 65536:
@@ -537,6 +546,10 @@ class StorPerfMaster(object):
logger.debug("Transferring fio to %s" % slave)
scp.put('/usr/local/bin/fio', '~/')
+ def _get_uname(self, ssh):
+ (_, stdout, _) = ssh.exec_command("uname -a")
+ return stdout.readline()
+
def _check_root_fs(self, ssh):
(_, stdout, _) = ssh.exec_command("df /")
stdout.readline()
diff --git a/docker/storperf-master/storperf/test_executor.py b/docker/storperf-master/storperf/test_executor.py
index 38e052e..0ab5698 100644
--- a/docker/storperf-master/storperf/test_executor.py
+++ b/docker/storperf-master/storperf/test_executor.py
@@ -69,7 +69,7 @@ class TestExecutor(object):
try:
installer = os.environ['INSTALLER_TYPE']
except KeyError:
- self.logger.error("Cannot determine installer")
+ self.logger.warn("Cannot determine installer")
installer = "Unknown_installer"
self.metadata = {}