← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1371040] Re: glance store rbd driver get method returns tupe more than basic driver defines

 

** Changed in: glance
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1371040

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

Status in OpenStack Image Registry and Delivery Service (Glance):
  Fix Released

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

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1371040/+subscriptions


References