glance store rbd driver get method returns tupe more than basic driver defines

Bug #1371040 reported by Yaguang Tang
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Medium
Zhi Yan Liu

Bug Description

glance_store/_drivers/rbd.py

def get(self, location, offset=0, chunk_size=None, context=None):
208 """
209 Takes a `glance_store.location.Location` object that indicates
210 where to find the image file, and returns a tuple of generator
211 (for reading the image file) and image_size
212
213 :param location `glance_store.location.Location` object, supplied
214 from glance_store.location.get_location_from_uri()
215 :raises `glance_store.exceptions.NotFound` if image does not exist
216 """
217 loc = location.store_location
218 return (ImageIterator(loc.image, self),
219 self.get_size(location), chunk_size)

the return tupe should be two values, not three, this is what all else expected.

@@ -453,7 +453,7 @@ class Controller(controller.BaseController):
             if dest is not None:
                 src_store.READ_CHUNKSIZE = dest.WRITE_CHUNKSIZE

             image_data, image_size = src_store.get(loc, context=context)

when using rbd backend, an exception raised too many values to unpack

tested with lastest trunk code base

Revision history for this message
Zhi Yan Liu (lzy-dev) wrote :

The issue has already been fixed by https://review.openstack.org/#/c/122359/ .

Changed in glance:
status: New → Fix Committed
Dolph Mathews (dolph)
Changed in glance:
milestone: none → juno-rc1
Dolph Mathews (dolph)
Changed in glance:
importance: Undecided → Medium
assignee: nobody → Zhi Yan Liu (lzy-dev)
Thierry Carrez (ttx)
Changed in glance:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: juno-rc1 → 2014.2
Revision history for this message
Yaguang Tang (heut2008) wrote :

This fix is on glance_store, I think we have to bump glance_store requirement in glance.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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