summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabe Westmaas <gabe.westmaas@rackspace.com>2011-11-03 18:44:51 +0000
committerGabe Westmaas <gabe.westmaas@rackspace.com>2011-11-03 19:01:43 +0000
commite45029ced19a3d80e006f917f0111c69f976cda1 (patch)
tree2b285c5766392d49c6a75435a0c8f5945e5e62a1
parent005db2d7d494115c05b68875dcf222a68abc0957 (diff)
downloadnova-e45029ced19a3d80e006f917f0111c69f976cda1.tar.gz
nova-e45029ced19a3d80e006f917f0111c69f976cda1.tar.xz
nova-e45029ced19a3d80e006f917f0111c69f976cda1.zip
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
-rw-r--r--nova/compute/api.py1
-rw-r--r--nova/compute/manager.py1
2 files changed, 2 insertions, 0 deletions
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,