aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQiLiang <liangqi1@huawei.com>2016-01-12 13:21:36 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-01-12 13:21:36 +0000
commite5a392b9488fbf6435fa0864e9e39b9afa540321 (patch)
treea12eb8a97cf802c459fb7a6b21b4a33947b59454
parent12521edea1e40e73e2fb04f4f230760de324521b (diff)
parent10e55c026879912a36247f8958c954cb7521f9e5 (diff)
Merge "Workround for openstack nova bug"
-rw-r--r--yardstick/benchmark/contexts/heat.py23
1 files changed, 21 insertions, 2 deletions
diff --git a/yardstick/benchmark/contexts/heat.py b/yardstick/benchmark/contexts/heat.py
index 7bd430bc5..8c514d250 100644
--- a/yardstick/benchmark/contexts/heat.py
+++ b/yardstick/benchmark/contexts/heat.py
@@ -129,8 +129,27 @@ class HeatContext(Context):
scheduler_hints = {}
for pg in server.placement_groups:
update_scheduler_hints(scheduler_hints, added_servers, pg)
- server.add_to_template(template, self.networks, scheduler_hints)
- added_servers.append(server.stack_name)
+ # workround for openstack nova bug, check JIRA: YARDSTICK-200
+ # for details
+ if len(availability_servers) == 2:
+ if len(scheduler_hints["different_host"]) == 0:
+ scheduler_hints.pop("different_host", None)
+ server.add_to_template(template,
+ self.networks,
+ scheduler_hints)
+ added_servers.append(server.stack_name)
+ else:
+ scheduler_hints["different_host"] = \
+ scheduler_hints["different_host"][0]
+ server.add_to_template(template,
+ self.networks,
+ scheduler_hints)
+ added_servers.append(server.stack_name)
+ else:
+ server.add_to_template(template,
+ self.networks,
+ scheduler_hints)
+ added_servers.append(server.stack_name)
# create list of servers with affinity policy
affinity_servers = []