Bugfix: yardstick will create stacks with the same name when run using API in parallel 71/29371/4
authorchenjiankun <chenjiankun1@huawei.com>
Sat, 25 Feb 2017 00:48:07 +0000 (00:48 +0000)
committerchenjiankun <chenjiankun1@huawei.com>
Wed, 8 Mar 2017 08:42:32 +0000 (08:42 +0000)
commitaf3478e95314b5147c7837831dc8113d552ba067
treee9411bebe78eca2f0d204d8a49464e7f620a0ff1
parent501175fbb095a771f5f1b9fb80dcf729192214d2
Bugfix: yardstick will create stacks with the same name when run using API in parallel

JIRA: YARDSTICK-575

Currently yardstick will create stacks with the same name when run using
API in parallel.
The reason is there is a global variable in context base and the core
will always deploy the first context in Context.list. When run in
parallel, it will run in the one process. So yardstick will deploy
stacks with the same name.
The solution is do not use Context.list in yardstick core. And using a
local variable instead.
BTW, if we use API to call yardstick core, we can not config the output
way. So I parse yardstick.conf when task start. And I think we can
include scenario_cfg, context_cfg, yardstick_cfg in one config object
later so that we can get all config in one object.

Change-Id: I1ada4ef486bd252e78c3a2e49c6a39b3f8f16a7c
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
13 files changed:
tests/unit/dispatcher/test_influxdb.py
yardstick/benchmark/contexts/base.py
yardstick/benchmark/contexts/dummy.py
yardstick/benchmark/contexts/heat.py
yardstick/benchmark/contexts/node.py
yardstick/benchmark/contexts/standalone.py
yardstick/benchmark/core/task.py
yardstick/benchmark/runners/base.py
yardstick/common/utils.py
yardstick/dispatcher/base.py
yardstick/dispatcher/file.py
yardstick/dispatcher/http.py
yardstick/dispatcher/influxdb.py