make schedule_to_every_node use real scheduler hint
force_hosts is a scheduler construct, however it's not one you can
directly set via the API. Because we don't enforce schema on hints it
was silently ignored. The supported way to do this is through a
slightly baroque pass through in availability zones.
availability_zone: "$ZONE:$HOST"
This can only be done by admins by default, so we need to handle to
also replace self.server_client with self.admin_manager.server_client.
Change-Id: I3e61f039acf3278e0231183c4a774caa91681f7a
diff --git a/tempest/scenario/test_server_multinode.py b/tempest/scenario/test_server_multinode.py
index 1645081..ef78b4a 100644
--- a/tempest/scenario/test_server_multinode.py
+++ b/tempest/scenario/test_server_multinode.py
@@ -34,11 +34,21 @@
"""
credentials = ['primary', 'admin']
+ @classmethod
+ def setup_clients(cls):
+ super(TestServerMultinode, cls).setup_clients()
+ # Use admin client by default
+ cls.manager = cls.admin_manager
+ # this is needed so that we can use the availability_zone:host
+ # scheduler hint, which is admin_only by default
+ cls.servers_client = cls.admin_manager.servers_client
+ super(TestServerMultinode, cls).resource_setup()
+
@test.idempotent_id('9cecbe35-b9d4-48da-a37e-7ce70aa43d30')
@test.attr(type='smoke')
@test.services('compute', 'network')
def test_schedule_to_all_nodes(self):
- host_client = self.admin_manager.hosts_client
+ host_client = self.manager.hosts_client
hosts = host_client.list_hosts()['hosts']
hosts = [x for x in hosts if x['service'] == 'compute']
@@ -55,7 +65,7 @@
for host in hosts[:CONF.compute.min_compute_nodes]:
create_kwargs = {
- 'scheduler_hints': {'force_hosts': host['host_name']}
+ 'availability_zone': '%(zone)s:%(host_name)s' % host
}
# by getting to active state here, this means this has