s3.py global name '_fix_image_id' is not defined

Bug #708301 reported by Dan Prince
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Sandy Walsh

Bug Description

Using build revision 623.

I get the following stack trace when running a euca-describe-images.

Getting the following stack trace in nova-api.log when trying to use the S3 API.

2011-01-26 20:21:35,068 AUDIT nova.api [7C2Z8EPC8WZF9OG9EPLK admin admin] Authenticated Request For admin:admin)
2011-01-26 20:21:35,069 DEBUG nova.api [-] action: DescribeImages from MainProcess (pid=12033) __call__ /usr/lib/pymodules/python2.6/nova/api/ec2/__init__.py:211
2011-01-26 20:21:35,069 DEBUG nova.api [-] arg: Owner.1 val: self from MainProcess (pid=12033) __call__ /usr/lib/pymodules/python2.6/nova/api/ec2/__init__.py:213
2011-01-26 20:21:35,393 ERROR nova.api [7C2Z8EPC8WZF9OG9EPLK admin admin] Unexpected error raised: global name '_fix_image_id' is not defined
(nova.api): TRACE: Traceback (most recent call last):
(nova.api): TRACE: File "/usr/lib/pymodules/python2.6/nova/api/ec2/__init__.py", line 315, in __call__
(nova.api): TRACE: result = api_request.invoke(context)
(nova.api): TRACE: File "/usr/lib/pymodules/python2.6/nova/api/ec2/apirequest.py", line 127, in invoke
(nova.api): TRACE: result = method(context, **args)
(nova.api): TRACE: File "/usr/lib/pymodules/python2.6/nova/api/ec2/cloud.py", line 844, in describe_images
(nova.api): TRACE: images = self.image_service.index(context)
(nova.api): TRACE: File "/usr/lib/pymodules/python2.6/nova/image/s3.py", line 82, in index

Related branches

Revision history for this message
Dan Prince (dan-prince) wrote :
Revision history for this message
Dan Prince (dan-prince) wrote :

[dan.prince@dovetail nova-fix_image_id_s3]$ bzr diff -r623
=== modified file 'nova/image/s3.py'
--- nova/image/s3.py 2011-01-25 21:06:05 +0000
+++ nova/image/s3.py 2011-01-26 21:11:22 +0000
@@ -65,7 +65,7 @@
                                  'image_id': image_id}))
         return image_id

- def _fix_image_id(images):
+ def _fix_image_id(self, images):
         """S3 has imageId but OpenStack wants id"""
         for image in images:
             if 'imageId' in image:
@@ -79,7 +79,7 @@
         response = self._conn(context).make_request(
             method='GET',
             bucket='_images')
- return _fix_image_id(json.loads(response.read()))
+ return self._fix_image_id(json.loads(response.read()))

     def show(self, context, image_id):
         """return a image object if the context has permissions"""

Changed in nova:
assignee: nobody → Sandy Walsh (sandy-walsh)
status: New → In Progress
status: In Progress → New
status: New → In Progress
Revision history for this message
Dan Prince (dan-prince) wrote :

The initial merge request failed because I was not in 'Authors'. I added myself to the Authors file and pushed fix_image_id_s3 again.

Should be all set.

Thierry Carrez (ttx)
Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → 2011.1
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.