diff options
author | Leo wang <grakiss.wanglei@huawei.com> | 2017-09-08 01:40:16 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-09-08 01:40:16 +0000 |
commit | 38407258e849fe630a1443fb71181b1b2b27ee90 (patch) | |
tree | 027522659f0dd9e5bd7dba8ebc57f65b962b49a9 | |
parent | 0c0e4109cdae9dde8346b92f694e272beb52fae7 (diff) | |
parent | 45b1f1841b35fd8771e2aa154b2f4a5af776bd46 (diff) |
Merge "Add a patch to set ha SLA to be 30 seconds"
-rw-r--r-- | dovetail/conf/yardstick_config.yml | 8 | ||||
-rw-r--r-- | dovetail/patch/0001-Adjust-Yardstick-HA-test-cases-SLA.patch | 119 | ||||
-rwxr-xr-x | dovetail/run.py | 13 |
3 files changed, 139 insertions, 1 deletions
diff --git a/dovetail/conf/yardstick_config.yml b/dovetail/conf/yardstick_config.yml index 62a4abf9..f49d044d 100644 --- a/dovetail/conf/yardstick_config.yml +++ b/dovetail/conf/yardstick_config.yml @@ -6,11 +6,17 @@ yardstick: config: dir: '/home/opnfv/userconfig' pre_condition: - - '' # - 'cd /home/opnfv/repos/yardstick && source tests/ci/prepare_env.sh && # source tests/ci/clean_images.sh && cleanup' # - 'cd /home/opnfv/repos/yardstick && source tests/ci/prepare_env.sh && # source tests/ci/load_images.sh' + # Copy Yardstick bugfix patches to Yardstick repository + - "cp -r /home/opnfv/userconfig/patch/ /home/opnfv/repos/yardstick/" + # Config git user info for applying bugfix patches + - "cd /home/opnfv/repos/yardstick && git config --global user.email 'you@example.com'" + - "cd /home/opnfv/repos/yardstick && git config --global user.name 'Your Name'" + # Apply all bugfix patchs on tempest code + - "cd /home/opnfv/repos/yardstick && git am ./patch/*.patch" cmds: - 'mkdir -p /home/opnfv/yardstick/results/' - "cd /home/opnfv/repos/yardstick && source tests/ci/prepare_env.sh && diff --git a/dovetail/patch/0001-Adjust-Yardstick-HA-test-cases-SLA.patch b/dovetail/patch/0001-Adjust-Yardstick-HA-test-cases-SLA.patch new file mode 100644 index 00000000..92c68032 --- /dev/null +++ b/dovetail/patch/0001-Adjust-Yardstick-HA-test-cases-SLA.patch @@ -0,0 +1,119 @@ +From 3beb6cdffa830f009d246e6352efa7ccf70463a0 Mon Sep 17 00:00:00 2001 +From: Jing Lu <hanazawarei@icloud.com> +Date: Sat, 26 Aug 2017 10:07:52 +0800 +Subject: [PATCH] Adjust Yardstick HA test cases SLA + +--- + tests/opnfv/test_cases/opnfv_yardstick_tc019.yaml | 4 ++-- + tests/opnfv/test_cases/opnfv_yardstick_tc045.yaml | 4 ++-- + tests/opnfv/test_cases/opnfv_yardstick_tc046.yaml | 4 ++-- + tests/opnfv/test_cases/opnfv_yardstick_tc047.yaml | 4 ++-- + tests/opnfv/test_cases/opnfv_yardstick_tc048.yaml | 4 ++-- + tests/opnfv/test_cases/opnfv_yardstick_tc053.yaml | 4 ++-- + 6 files changed, 12 insertions(+), 12 deletions(-) + +diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc019.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc019.yaml +index 5d3057d..c1d3645 100644 +--- a/tests/opnfv/test_cases/opnfv_yardstick_tc019.yaml ++++ b/tests/opnfv/test_cases/opnfv_yardstick_tc019.yaml +@@ -34,10 +34,10 @@ scenarios: + - monitor_type: "process" + process_name: "nova-api" + host: node1 +- monitor_time: 20 ++ monitor_time: 30 + monitor_number: 3 + sla: +- max_recover_time: 20 ++ max_recover_time: 30 + + nodes: + node1: node1.LF +diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc045.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc045.yaml +index d851d5a..8c7348b 100644 +--- a/tests/opnfv/test_cases/opnfv_yardstick_tc045.yaml ++++ b/tests/opnfv/test_cases/opnfv_yardstick_tc045.yaml +@@ -33,10 +33,10 @@ scenarios: + - monitor_type: "process" + process_name: "neutron-server" + host: node1 +- monitor_time: 20 ++ monitor_time: 30 + monitor_number: 3 + sla: +- max_recover_time: 20 ++ max_recover_time: 30 + + nodes: + node1: node1.LF +diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc046.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc046.yaml +index ad81a14..635e4d9 100644 +--- a/tests/opnfv/test_cases/opnfv_yardstick_tc046.yaml ++++ b/tests/opnfv/test_cases/opnfv_yardstick_tc046.yaml +@@ -33,10 +33,10 @@ scenarios: + - monitor_type: "process" + process_name: "keystone" + host: node1 +- monitor_time: 20 ++ monitor_time: 30 + monitor_number: 3 + sla: +- max_recover_time: 20 ++ max_recover_time: 30 + + nodes: + node1: node1.LF +diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc047.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc047.yaml +index cc99036..57fa739 100644 +--- a/tests/opnfv/test_cases/opnfv_yardstick_tc047.yaml ++++ b/tests/opnfv/test_cases/opnfv_yardstick_tc047.yaml +@@ -33,10 +33,10 @@ scenarios: + - monitor_type: "process" + process_name: "glance-api" + host: node1 +- monitor_time: 20 ++ monitor_time: 30 + monitor_number: 3 + sla: +- max_recover_time: 20 ++ max_recover_time: 30 + + nodes: + node1: node1.LF +diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc048.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc048.yaml +index 237f845..06ad641 100644 +--- a/tests/opnfv/test_cases/opnfv_yardstick_tc048.yaml ++++ b/tests/opnfv/test_cases/opnfv_yardstick_tc048.yaml +@@ -33,10 +33,10 @@ scenarios: + - monitor_type: "process" + process_name: "cinder-api" + host: node1 +- monitor_time: 20 ++ monitor_time: 30 + monitor_number: 3 + sla: +- max_recover_time: 20 ++ max_recover_time: 30 + + nodes: + node1: node1.LF +diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc053.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc053.yaml +index 9e05cc8..e3f0934 100644 +--- a/tests/opnfv/test_cases/opnfv_yardstick_tc053.yaml ++++ b/tests/opnfv/test_cases/opnfv_yardstick_tc053.yaml +@@ -32,10 +32,10 @@ scenarios: + key: "service-status" + process_name: "haproxy" + host: node1 +- monitor_time: 20 ++ monitor_time: 30 + monitor_number: 3 + sla: +- max_recover_time: 20 ++ max_recover_time: 30 + + - + monitor_type: "openstack-cmd" +-- +2.13.1 (Apple Git-89) + diff --git a/dovetail/run.py b/dovetail/run.py index 01111dd3..1133b864 100755 --- a/dovetail/run.py +++ b/dovetail/run.py @@ -203,7 +203,9 @@ def get_result_path(): result_path = os.path.join(dovetail_home, 'results') dt_cfg.dovetail_config['result_dir'] = result_path pre_config_path = os.path.join(dovetail_home, 'pre_config') + patch_set_path = os.path.join(dovetail_home, 'patch') dt_cfg.dovetail_config['config_dir'] = pre_config_path + dt_cfg.dovetail_config['patch_dir'] = patch_set_path return dovetail_home @@ -217,6 +219,16 @@ def copy_userconfig_files(logger): dt_utils.exec_cmd(cmd, logger, exit_on_error=False) +def copy_patch_files(logger): + dovetail_home = os.path.dirname(os.path.abspath(__file__)) + patch_path = os.path.join(dovetail_home, 'patch') + patch_set_path = dt_cfg.dovetail_config['patch_dir'] + if not os.path.isdir(patch_set_path): + os.makedirs(patch_set_path) + cmd = 'sudo cp -r %s/* %s' % (patch_path, patch_set_path) + dt_utils.exec_cmd(cmd, logger, exit_on_error=False) + + # env_init can source some env variable used in dovetail, such as # when https+credential used, OS_CACERT def env_init(logger): @@ -244,6 +256,7 @@ def main(*args, **kwargs): logger.info('Build tag: {}'.format(dt_cfg.dovetail_config['build_tag'])) env_init(logger) copy_userconfig_files(logger) + copy_patch_files(logger) dt_utils.check_docker_version(logger) validate_input(kwargs, dt_cfg.dovetail_config['validate_input'], logger) configs = filter_config(kwargs, logger) |