From fcdfa93b210a092894284f60309e660a3a058fde Mon Sep 17 00:00:00 2001 From: Chris Behrens Date: Wed, 8 Aug 2012 20:49:27 +0000 Subject: Send updated instance model to schedule_prep_resize A stale instance model was being passed to schedule_prep_resize. Fixes bug 1034595 Change-Id: Ic92a22a2c315d25c70d32685fdf9f38451077b9a --- nova/compute/api.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'nova/compute') diff --git a/nova/compute/api.py b/nova/compute/api.py index 0122e175a..7164930f0 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -1427,11 +1427,8 @@ class API(base.Base): if (current_memory_mb == new_memory_mb) and flavor_id: raise exception.CannotResizeToSameSize() - self.update(context, - instance, - task_state=task_states.RESIZE_PREP, - progress=0, - **kwargs) + instance = self.update(context, instance, + task_state=task_states.RESIZE_PREP, progress=0, **kwargs) request_spec = { 'instance_type': new_instance_type, -- cgit