From 8858d4856e27f70638161633a983b5d123b04832 Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Thu, 28 Feb 2013 17:04:11 -0500 Subject: Don't use instance['instance_type'] for scheduler filters in migration Instead, pull a fresh copy from the database, which has the proper extra_specs cleanup which everyone downstream of us expects. Fixes bug 1136430 Change-Id: Ifcb9feff8291096eed7c198b8e7a35c3c38ca93e --- nova/scheduler/driver.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'nova/scheduler') diff --git a/nova/scheduler/driver.py b/nova/scheduler/driver.py index accdead2d..3426c484c 100644 --- a/nova/scheduler/driver.py +++ b/nova/scheduler/driver.py @@ -256,9 +256,11 @@ class Scheduler(object): # If dest is not specified, have scheduler pick one. if dest is None: + instance_type = db.instance_type_get( + context, instance_ref['instance_type_id']) image = self.image_service.show(context, instance_ref['image_ref']) request_spec = {'instance_properties': instance_ref, - 'instance_type': instance_ref['instance_type'], + 'instance_type': instance_type, 'instance_uuids': [instance_ref['uuid']], 'image': image} filter_properties = {'ignore_hosts': ignore_hosts} -- cgit