aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorliang gao <jean.gaoliang@huawei.com>2016-08-11 15:41:04 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-08-11 15:41:05 +0000
commitd333fa23d6cdd9628acf548d19fc3f20b7e33547 (patch)
tree71396c8d2699de291d04096fb3e0af1179016fe9
parent07b65b575c786fa40917f23757f3f585c8c3f555 (diff)
parentc5070e9bcc1015a72d0e8259066f6f88fc62fcea (diff)
Merge "BugFix: fix Storperf CI bug"
-rwxr-xr-xtests/ci/yardstick-verify5
-rw-r--r--yardstick/cmd/commands/plugin.py20
2 files changed, 18 insertions, 7 deletions
diff --git a/tests/ci/yardstick-verify b/tests/ci/yardstick-verify
index b3cae1188..bdb91003d 100755
--- a/tests/ci/yardstick-verify
+++ b/tests/ci/yardstick-verify
@@ -128,10 +128,13 @@ install_storperf()
echo
echo "========== Installing storperf =========="
- if ! yardstick plugin install plugin/CI/storperf.yaml; then
+ if ! yardstick -d plugin install plugin/CI/storperf.yaml; then
echo "Install storperf plugin FAILED";
exit 1
fi
+
+ echo
+ echo "========== Installed storperf container =========="
fi
}
diff --git a/yardstick/cmd/commands/plugin.py b/yardstick/cmd/commands/plugin.py
index 0ab24fcfc..9936942d8 100644
--- a/yardstick/cmd/commands/plugin.py
+++ b/yardstick/cmd/commands/plugin.py
@@ -41,8 +41,10 @@ class PluginCommands(object):
plugin_name = plugins.get("name")
print("Installing plugin: %s" % plugin_name)
+ LOG.info("Executing _install_setup()")
self._install_setup(plugin_name, deployment)
+ LOG.info("Executing _run()")
self._run(plugin_name)
total_end_time = time.time()
@@ -61,10 +63,12 @@ class PluginCommands(object):
plugins, deployment = parser.parse_plugin()
plugin_name = plugins.get("name")
- print("Remove plugin: %s" % plugin_name)
+ print("Removing plugin: %s" % plugin_name)
+ LOG.info("Executing _remove_setup()")
self._remove_setup(plugin_name, deployment)
+ LOG.info("Executing _run()")
self._run(plugin_name)
total_end_time = time.time()
@@ -86,18 +90,20 @@ class PluginCommands(object):
if deployment_ip == "local":
installer_ip = os.environ.get("INSTALLER_IP", None)
- LOG.debug("user:%s, host:%s", deployment_user, installer_ip)
+ LOG.info("user:%s, host:%s", deployment_user, installer_ip)
self.client = ssh.SSH(deployment_user, installer_ip,
password=deployment_password)
self.client.wait(timeout=600)
else:
- LOG.debug("user:%s, host:%s", deployment_user, deployment_ip)
+ LOG.info("user:%s, host:%s", deployment_user, deployment_ip)
self.client = ssh.SSH(deployment_user, deployment_ip,
password=deployment_password)
self.client.wait(timeout=600)
# copy script to host
cmd = "cat > ~/%s.sh" % plugin_name
+
+ LOG.info("copying script to host: %s", cmd)
self.client.run(cmd, stdin=open(self.script, 'rb'))
def _remove_setup(self, plugin_name, deployment):
@@ -113,25 +119,27 @@ class PluginCommands(object):
if deployment_ip == "local":
installer_ip = os.environ.get("INSTALLER_IP", None)
- LOG.debug("user:%s, host:%s", deployment_user, installer_ip)
+ LOG.info("user:%s, host:%s", deployment_user, installer_ip)
self.client = ssh.SSH(deployment_user, installer_ip,
password=deployment_password)
self.client.wait(timeout=600)
else:
- LOG.debug("user:%s, host:%s", deployment_user, deployment_ip)
+ LOG.info("user:%s, host:%s", deployment_user, deployment_ip)
self.client = ssh.SSH(deployment_user, deployment_ip,
password=deployment_password)
self.client.wait(timeout=600)
# copy script to host
cmd = "cat > ~/%s.sh" % plugin_name
+
+ LOG.info("copying script to host: %s", cmd)
self.client.run(cmd, stdin=open(self.script, 'rb'))
def _run(self, plugin_name):
'''Run installation script '''
cmd = "sudo bash %s" % plugin_name + ".sh"
- LOG.debug("Executing command: %s", cmd)
+ LOG.info("Executing command: %s", cmd)
status, stdout, stderr = self.client.execute(cmd)