From 98ff39a0bb75e2ae07b4af77ddb127ffaeb4ce5b Mon Sep 17 00:00:00 2001 From: xudan Date: Mon, 25 Sep 2017 04:44:38 -0400 Subject: 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 --- dovetail/run.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'dovetail/run.py') 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: -- cgit 1.2.3-korg