Merge lp:~rlane/nova/lp705205 into lp:~hudson-openstack/nova/trunk

Proposed by Ryan Lane
Status: Merged
Approved by: Devin Carlen
Approved revision: 397
Merged at revision: 596
Proposed branch: lp:~rlane/nova/lp705205
Merge into: lp:~hudson-openstack/nova/trunk
Diff against target: 22 lines (+5/-2)
1 file modified
nova/compute/api.py (+5/-2)
To merge this branch: bzr merge lp:~rlane/nova/lp705205
Reviewer Review Type Date Requested Status
Devin Carlen (community) Approve
Vish Ishaya (community) Approve
Review via email: mp+46958@code.launchpad.net

Commit message

Fixes issue with instance creation throwing errors when non-default groups are used.

To post a comment you must log in.
Revision history for this message
Vish Ishaya (vishvananda) wrote :

lgtm

review: Approve
Revision history for this message
Devin Carlen (devcamcar) 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-01-18 23:50:47 +0000
3+++ nova/compute/api.py 2011-01-20 19:37:54 +0000
4@@ -246,13 +246,16 @@
5 # ..then we distill the security groups to which they belong..
6 security_groups = set()
7 for rule in security_group_rules:
8- security_groups.add(rule['parent_group_id'])
9+ security_group = self.db.security_group_get(
10+ context,
11+ rule['parent_group_id'])
12+ security_groups.add(security_group)
13
14 # ..then we find the instances that are members of these groups..
15 instances = set()
16 for security_group in security_groups:
17 for instance in security_group['instances']:
18- instances.add(instance['id'])
19+ instances.add(instance)
20
21 # ...then we find the hosts where they live...
22 hosts = set()