Fix a remaining case of passing context to a remotable in scheduler

This slipped through the previous patches and is needed for the
next one to ban context passing.

Related to blueprint kilo-objects

Change-Id: I7972d50ccf45e34d5899c0574e2cd94e207e4f75
This commit is contained in:
Dan Smith
2015-03-09 11:20:41 -07:00
parent 191fda5d6d
commit e664cf788d

View File

@@ -290,7 +290,7 @@ def _get_group_details(context, instance_uuid, user_group_hosts=None):
msg = _("ServerGroupAntiAffinityFilter not configured")
LOG.error(msg)
raise exception.UnsupportedPolicyException(reason=msg)
group_hosts = set(group.get_hosts(context))
group_hosts = set(group.get_hosts())
user_hosts = set(user_group_hosts) if user_group_hosts else set()
return GroupDetails(hosts=user_hosts | group_hosts,
policies=group.policies)