← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1413205] Re: RBD backend errors are not raised correctly

 

*** This bug is a duplicate of bug 1501443 ***
    https://bugs.launchpad.net/bugs/1501443

** This bug has been marked a duplicate of bug 1501443
   glance_store exceptions trigger child exceptions (which break Glance's error handling)

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

Title:
  RBD backend errors are not raised correctly

Status in Glance:
  New

Bug description:
  glance_store 2014.2
  When operation on RBD backend fail, e.g. by trying to open missing image in RBD pool, glance_store tries to raise exception NotFound with incorrect argument list, so glance API returns Internal Server Error 500.
  Older version (2014.1) returns 404.

  Steps to reproduce:
  $ glance image-create --name test --disk-format qcow2 --container-format bare --copy-from http://download.cirros-cloud.net/0.3.3/cirros-0.3.3-i386-disk.img
  # rbd -p images snap unprotect dbedacd2-a140-4816-a96d-b98ef610ddc3@snap
  # rbd -p images snap rm dbedacd2-a140-4816-a96d-b98ef610ddc3@snap
  # rbd -p images rm dbedacd2-a140-4816-a96d-b98ef610ddc3
  # glance-cache-manage -f delete-all-cached-images # only if cache used
  $ glance image-download --file img dbedacd2-a140-4816-a96d-b98ef610ddc3
  HTTPInternalServerError (HTTP 500)

  Backtrace in log:
    File "/usr/lib/python2.7/dist-packages/glance/api/v1/images.py", line 454, in _get_from_store
      image_data, image_size = src_store.get(loc, context=context)
    File "/usr/lib/python2.7/dist-packages/glance_store/_drivers/rbd.py", line 222, in get
      chunk_size or self.get_size(location))
    File "/usr/lib/python2.7/dist-packages/glance_store/_drivers/rbd.py", line 248, in get_size
      raise exceptions.NotFound(msg)
  TypeError: __init__() takes exactly 1 argument (2 given)

  Request log attached.

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


References