Merge lp:~johannes.erdfelt/nova/lp820987 into lp:~hudson-openstack/nova/trunk

Proposed by Johannes Erdfelt
Status: Merged
Approved by: Josh Kearney
Approved revision: 1365
Merged at revision: 1369
Proposed branch: lp:~johannes.erdfelt/nova/lp820987
Merge into: lp:~hudson-openstack/nova/trunk
Diff against target: 21 lines (+2/-2)
1 file modified
nova/compute/api.py (+2/-2)
To merge this branch: bzr merge lp:~johannes.erdfelt/nova/lp820987
Reviewer Review Type Date Requested Status
Josh Kearney (community) Approve
Brian Lamar (community) Approve
Review via email: mp+70458@code.launchpad.net

Description of the change

The logic for confirming and reverting resizes was flipped. As a result, reverting a resize would end up deleting the source (instead of the destination) instance, and confirming would end up deleting the destination (instead of the source) instance.

This branch fixes the logic to be correct.

To post a comment you must log in.
Revision history for this message
Brian Lamar (blamar) wrote :

Yeah, I'm unsure how this got switched up, but this logically makes a lot more sense.

review: Approve
Revision history for this message
Josh Kearney (jk0) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'nova/compute/api.py'
2--- nova/compute/api.py 2011-08-03 11:31:10 +0000
3+++ nova/compute/api.py 2011-08-04 16:01:18 +0000
4@@ -888,7 +888,7 @@
5 params = {'migration_id': migration_ref['id']}
6 self._cast_compute_message('revert_resize', context,
7 instance_ref['uuid'],
8- migration_ref['source_compute'],
9+ migration_ref['dest_compute'],
10 params=params)
11
12 self.db.migration_update(context, migration_ref['id'],
13@@ -908,7 +908,7 @@
14 params = {'migration_id': migration_ref['id']}
15 self._cast_compute_message('confirm_resize', context,
16 instance_ref['uuid'],
17- migration_ref['dest_compute'],
18+ migration_ref['source_compute'],
19 params=params)
20
21 self.db.migration_update(context, migration_ref['id'],