From e7c4d05b182e834fe55164315fc9b36a322578a2 Mon Sep 17 00:00:00 2001 From: liyin Date: Tue, 21 Feb 2017 17:20:28 +0800 Subject: quota limit for posca_stress_ping JIRA:BOTTLENECK-140 Those code will update an action of quota. Before out test begin we will make quota no limit. so we could do stress test. Those quota limit will change openstack forever. maybe will create damage for openstack. Change-Id: I0a6a06c6c303589881cb2ab7b754213ecf1a845f Signed-off-by: liyin --- testsuites/posca/testcase_cfg/posca_stress_ping.yaml | 2 +- testsuites/posca/testcase_script/posca_stress_ping.py | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'testsuites') diff --git a/testsuites/posca/testcase_cfg/posca_stress_ping.yaml b/testsuites/posca/testcase_cfg/posca_stress_ping.yaml index a60a8832..75eba97d 100644 --- a/testsuites/posca/testcase_cfg/posca_stress_ping.yaml +++ b/testsuites/posca/testcase_cfg/posca_stress_ping.yaml @@ -7,7 +7,7 @@ load_manager: tool: ping test_times: 100 package_size: - num_stack: 2, 5, 10 + num_stack: 5, 10, 20 package_loss: 10% contexts: diff --git a/testsuites/posca/testcase_script/posca_stress_ping.py b/testsuites/posca/testcase_script/posca_stress_ping.py index 02244a37..732422ea 100644 --- a/testsuites/posca/testcase_script/posca_stress_ping.py +++ b/testsuites/posca/testcase_script/posca_stress_ping.py @@ -18,8 +18,9 @@ import os import multiprocessing import docker import datetime -import utils.infra_setup.runner.yardstick as Runner from utils.parser import Parser as conf_parser +import utils.env_prepare.quota_prepare as quota_prepare +import utils.env_prepare.stack_prepare as stack_prepare import testsuites.posca.testcase_dashboard.posca_stress_ping as DashBoard # -------------------------------------------------- # logging configuration @@ -40,9 +41,12 @@ testcase, file_format = os.path.splitext(testfile) def env_pre(con_dic): + stack_prepare._prepare_env_daemon() + quota_prepare.quota_env_prepare() client = docker.from_env() con = client.containers.get('bottleneckcompose_yardstick_1') cmd = ('yardstick env prepare') + LOG.info("yardstick envrionment prepare!") stdout = con.exec_run(cmd) LOG.debug(stdout) @@ -99,14 +103,16 @@ def run(test_config): LOG.info("Create Dashboard data") DashBoard.posca_stress_ping(test_config["dashboard"]) - LOG.info("yardstick envrionment prepare!") + LOG.info("bottlenecks envrionment prepare!") env_pre(con_dic) + LOG.info("yardstick envrionment prepare done!") for value in test_num: result = [] out_num = 0 num = int(value) pool = multiprocessing.Pool(processes=num) + LOG.info("begin to run %s thread" % num) starttime = datetime.datetime.now() for i in range(0, int(num)): -- cgit 1.2.3-korg