summaryrefslogtreecommitdiffstats
path: root/nova
diff options
context:
space:
mode:
authorDan Prince <dprince@redhat.com>2012-08-17 14:50:42 -0400
committerDan Prince <dprince@redhat.com>2012-08-17 14:55:25 -0400
commitd40c75fa16e3a302a90c9edd29be6707012b21bd (patch)
treeff9ae15b7a792c42906e853fbdbdd2d47f77ef57 /nova
parent275b97a33a843be620cd348796c1d1aac72f007b (diff)
Fix a TypeError that occurs in _reschedule.
Updates the compute manager so that it passes the correct arguments to the scheduler API's run_instance function. Fixes the following exception which will occur if an instance is rescheduled: TypeError: run_instance() got an unexpected keyword argument 'reservations' As part the fix the FakeSchedulerAPI we use in test_compute.py has been updated to match the arguments of the real scheduler API. Fixes LP Bug #1038193. Change-Id: I25782b79a7b19013b25cb94cc5569b5aa83a2df0
Diffstat (limited to 'nova')
-rw-r--r--nova/compute/manager.py3
-rw-r--r--nova/tests/compute/test_compute.py5
2 files changed, 5 insertions, 3 deletions
diff --git a/nova/compute/manager.py b/nova/compute/manager.py
index c0f37d877..cb455c1c9 100644
--- a/nova/compute/manager.py
+++ b/nova/compute/manager.py
@@ -600,8 +600,7 @@ class ComputeManager(manager.SchedulerDependentManager):
retry['num_attempts'], instance_uuid=instance_uuid)
self.scheduler_rpcapi.run_instance(context,
request_spec, admin_password, injected_files,
- requested_networks, is_first_time, filter_properties,
- reservations=None, call=False)
+ requested_networks, is_first_time, filter_properties)
return True
@manager.periodic_task
diff --git a/nova/tests/compute/test_compute.py b/nova/tests/compute/test_compute.py
index 8a46d51ec..b6ce0afe2 100644
--- a/nova/tests/compute/test_compute.py
+++ b/nova/tests/compute/test_compute.py
@@ -75,7 +75,10 @@ def nop_report_driver_status(self):
class FakeSchedulerAPI(object):
- def run_instance(self, *args, **kwargs):
+
+ def run_instance(self, ctxt, request_spec, admin_password,
+ injected_files, requested_networks, is_first_time,
+ filter_properties):
pass