Skip to content

Commit

Permalink
Don't update database before resize
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Gabe Westmaas committed Nov 3, 2011
1 parent 005db2d commit e45029c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions nova/compute/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1321,6 +1321,7 @@ def resize(self, context, instance_id, flavor_id=None):
{"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")
Expand Down
1 change: 1 addition & 0 deletions nova/compute/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1123,6 +1123,7 @@ def finish_resize(self, context, instance_id, migration_id, disk_info):
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,
Expand Down

0 comments on commit e45029c

Please sign in to comment.