From 78910be08b9d55b7638ec9bdd582ae5e818850e7 Mon Sep 17 00:00:00 2001 From: Chris Behrens Date: Wed, 25 Jan 2012 11:55:04 -0800 Subject: Don't pass filter_properites to managers Fixes bug 921789 distributed_scheduler is trying to pass filter_properties to compute manager but it's not serializable.. and we shouldn't pass it anyway. Change-Id: I17ce04b71dfa3cef77a6883ce3cd6fede95a538a --- nova/tests/scheduler/test_distributed_scheduler.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'nova/tests') diff --git a/nova/tests/scheduler/test_distributed_scheduler.py b/nova/tests/scheduler/test_distributed_scheduler.py index 426da044f..f385ef7b7 100644 --- a/nova/tests/scheduler/test_distributed_scheduler.py +++ b/nova/tests/scheduler/test_distributed_scheduler.py @@ -129,6 +129,8 @@ class DistributedSchedulerTestCase(test.TestCase): return least_cost.WeightedHost(1, zone='x', blob='y') def _fake_provision_resource_locally(*args, **kwargs): + # Tests that filter_properties is stripped + self.assertNotIn('filter_properties', kwargs) self.locally_called = True return 1 @@ -152,7 +154,8 @@ class DistributedSchedulerTestCase(test.TestCase): } fake_context = context.RequestContext('user', 'project') - instances = sched.schedule_run_instance(fake_context, request_spec) + instances = sched.schedule_run_instance(fake_context, request_spec, + filter_properties={}) self.assertTrue(instances) self.assertFalse(self.schedule_called) self.assertTrue(self.from_blob_called) -- cgit