summaryrefslogtreecommitdiffstats
path: root/dovetail/run.py
diff options
context:
space:
mode:
authorxudan <xudan16@huawei.com>2017-09-25 04:44:38 -0400
committerxudan <xudan16@huawei.com>2017-09-26 03:11:58 -0400
commit98ff39a0bb75e2ae07b4af77ddb127ffaeb4ce5b (patch)
treecbc38d97d8a4ac28551c92f05b4f8e7aa8f94ea8 /dovetail/run.py
parent6f47c82d4b6f830863ff1330163d869baa6c7eec (diff)
Make Yardstick log level can be set by CLI
1. Currently, the log level of yardstick is DEBUG and cannot be modified. 2. Make it can be changed from CLI. 3. When use dovetail run --debug, can see all Yardstick logs (including DEBUG) in dovetail.log. 4. When run without debug option, cannot see Yardstick debug logs in dovetail.logs. 5. yardstick.log always doesn't include debug logs. JIRA: DOVETAIL-506 Change-Id: Iaafb61232a22e16fff2fa4605bf7e262b022085e Signed-off-by: xudan <xudan16@huawei.com>
Diffstat (limited to 'dovetail/run.py')
-rwxr-xr-xdovetail/run.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/dovetail/run.py b/dovetail/run.py
index 1133b864..c7496475 100755
--- a/dovetail/run.py
+++ b/dovetail/run.py
@@ -239,6 +239,14 @@ def env_init(logger):
dt_utils.source_env(openrc)
+def check_hosts_file(logger):
+ hosts_file = os.path.join(dt_cfg.dovetail_config['config_dir'],
+ 'hosts.yaml')
+ if not os.path.isfile(hosts_file):
+ logger.warn("There is no hosts file {}, may be some issues with "
+ "domain name resolution.".format(hosts_file))
+
+
def main(*args, **kwargs):
"""Dovetail compliance test entry!"""
build_tag = "daily-master-%s" % str(uuid.uuid1())
@@ -259,6 +267,7 @@ def main(*args, **kwargs):
copy_patch_files(logger)
dt_utils.check_docker_version(logger)
validate_input(kwargs, dt_cfg.dovetail_config['validate_input'], logger)
+ check_hosts_file(logger)
configs = filter_config(kwargs, logger)
if configs is not None: