← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1185609] Re: Swift Store: Exceptions from uploading chunks are raise incorrectly

 

I think this bug got addressed here: https://review.openstack.org/#/c/47534/
Please correct if wrong

** Changed in: glance
       Status: Triaged => Invalid

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

Title:
  Swift Store: Exceptions from uploading chunks are raise incorrectly

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

Bug description:
  in glance/store/swift.py

  Exceptions that are raised from "put_object" may get lost if there is
  an exception when cleaning up stale chunks. This is because the
  exc_info is lost in _delete_stale_chunks if there is another exception
  that is caught. so line 382 "raise" is not good enough and we need to
  ensure we reraise the original exception.

  
  315     def _delete_stale_chunks(self, connection, container, chunk_list):
  316         for chunk in chunk_list:
  317             LOG.debug(_("Deleting chunk %s" % chunk))
  318             try:
  319                 connection.delete_object(container, chunk)
  320             except Exception:
  321                 msg = _("Failed to delete orphaned chunk %s/%s")
  322                 LOG.exception(msg, container, chunk)

  ...

  372                     try:
  373                         chunk_etag = connection.put_object(
  374                             location.container, chunk_name, reader,
  375                             content_length=content_length)
  376                         written_chunks.append(chunk_name)
  377                     except Exception:
  378                         # Delete orphaned segments from swift backend
  379                         self._delete_stale_chunks(connection,
  380                                                   location.container,
  381                                                   written_chunks)
  382                         raise

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