Merge lp:~vishvananda/nova/lp821708 into lp:~hudson-openstack/nova/trunk

Proposed by Vish Ishaya
Status: Merged
Approved by: Jesse Andrews
Approved revision: 1389
Merged at revision: 1389
Proposed branch: lp:~vishvananda/nova/lp821708
Merge into: lp:~hudson-openstack/nova/trunk
Diff against target: 18 lines (+3/-2)
1 file modified
bin/nova-manage (+3/-2)
To merge this branch: bzr merge lp:~vishvananda/nova/lp821708
Reviewer Review Type Date Requested Status
Jesse Andrews (community) Approve
Ed Leafe (community) Approve
Review via email: mp+70635@code.launchpad.net

Description of the change

Fixes broken image_convert. The context being passed to glance image service was not a real context.

To post a comment you must log in.
Revision history for this message
Ed Leafe (ed-leafe) wrote :

lgtm

review: Approve
Revision history for this message
Jesse Andrews (anotherjesse) wrote :

lgtm

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/nova-manage'
2--- bin/nova-manage 2011-08-03 07:16:52 +0000
3+++ bin/nova-manage 2011-08-05 22:37:29 +0000
4@@ -1235,11 +1235,12 @@
5 is_public, architecture)
6
7 def _lookup(self, old_image_id):
8+ elevated = context.get_admin_context()
9 try:
10 internal_id = ec2utils.ec2_id_to_id(old_image_id)
11- image = self.image_service.show(context, internal_id)
12+ image = self.image_service.show(elevated, internal_id)
13 except (exception.InvalidEc2Id, exception.ImageNotFound):
14- image = self.image_service.show_by_name(context, old_image_id)
15+ image = self.image_service.show_by_name(elevated, old_image_id)
16 return image['id']
17
18 def _old_to_new(self, old):