Skip to content

Commit

Permalink
Set instance['host'] to the original host value on revert resize.
Browse files Browse the repository at this point in the history
Fixes bug #901445

Change-Id: I8c112d92d6a54715073ef1119372d782c3be37c9
  • Loading branch information
Dan Prince authored and Brian Waldon committed Dec 7, 2011
1 parent c3b7cce commit 2706ec2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions nova/compute/manager.py
Expand Up @@ -998,6 +998,7 @@ def finish_revert_resize(self, context, instance_uuid, migration_id):
self._instance_update(context,
instance_ref["uuid"],
memory_mb=instance_type['memory_mb'],
host=migration_ref['source_compute'],
vcpus=instance_type['vcpus'],
local_gb=instance_type['local_gb'],
instance_type_id=instance_type['id'])
Expand Down
1 change: 1 addition & 0 deletions nova/tests/test_compute.py
Expand Up @@ -838,6 +838,7 @@ def fake(*args, **kwargs):
instance_type_ref = db.instance_type_get(context,
inst_ref['instance_type_id'])
self.assertEqual(instance_type_ref['flavorid'], '1')
self.assertEqual(inst_ref['host'], migration_ref['source_compute'])

self.compute.terminate_instance(context, inst_ref['uuid'])

Expand Down

0 comments on commit 2706ec2

Please sign in to comment.