diff options
author | Dan Smith <danms@us.ibm.com> | 2013-02-28 17:04:11 -0500 |
---|---|---|
committer | Dan Smith <danms@us.ibm.com> | 2013-02-28 18:26:28 -0500 |
commit | 8858d4856e27f70638161633a983b5d123b04832 (patch) | |
tree | d58063cb4e31f22c2358aae7a7bc66a33a31164d /nova/scheduler | |
parent | b58bd0cd9a6ecb960a7c833d1f4857629ed1ab05 (diff) | |
download | nova-8858d4856e27f70638161633a983b5d123b04832.tar.gz nova-8858d4856e27f70638161633a983b5d123b04832.tar.xz nova-8858d4856e27f70638161633a983b5d123b04832.zip |
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
Diffstat (limited to 'nova/scheduler')
-rw-r--r-- | nova/scheduler/driver.py | 4 |
1 files changed, 3 insertions, 1 deletions
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} |