From e45029ced19a3d80e006f917f0111c69f976cda1 Mon Sep 17 00:00:00 2001 From: Gabe Westmaas Date: Thu, 3 Nov 2011 18:44:51 +0000 Subject: Don't update database before resize Fixes bug lp885815 by ensuring the scheduler doesn't update the database with destination host. Compute manager now updates upon completion of resize. Change-Id: I3f9ac664c8807e8523802e2485d316a731190764 --- nova/compute/api.py | 1 + nova/compute/manager.py | 1 + 2 files changed, 2 insertions(+) diff --git a/nova/compute/api.py b/nova/compute/api.py index b6ba86eb3..0d6498693 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -1321,6 +1321,7 @@ class API(base.Base): {"method": "prep_resize", "args": {"topic": FLAGS.compute_topic, "instance_id": instance_ref['uuid'], + "update_db": False, "instance_type_id": new_instance_type['id']}}) @scheduler_api.reroute_compute("add_fixed_ip") diff --git a/nova/compute/manager.py b/nova/compute/manager.py index ddd878664..89971bbc7 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -1123,6 +1123,7 @@ class ComputeManager(manager.SchedulerDependentManager): self._instance_update(context, instance_id, vm_state=vm_states.ACTIVE, + host=migration_ref['dest_compute'], task_state=task_states.RESIZE_VERIFY) self.db.migration_update(context, migration_id, -- cgit