← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1337367] [NEW] The add method of swift.py have a problem.When a large image is uploading and the glance-api is restarted, then we can not delete the image content that have been uploaded in swift

 

Public bug reported:

1. upload a large image, for example 50G
2. kill glance-api when image status:saving
3. restart glance-api
4. delete image

the image content that have been uploaded can not be deleted. I think the add method of glance/swift/BaseStore should put the object manifest onto swift first, before we upload the content when we upload a large image in chunks.
 manifest = "%s/%s-" % (location.container, location.obj)
 headers = {'ETag': hashlib.md5("").hexdigest(), 'X-Object-Manifest': manifest}
connection.put_object(location.container, location.obj,  None, headers=headers)
the code above shoud put before the code we upload the image chunks.

** Affects: glance
     Importance: Undecided
         Status: New

** Description changed:

  1. upload a large image, for example 50G
  2. kill glance-api when image status:saving
  3. restart glance-api
  4. delete image
  
- the image content that have been uploaded can not be deleted. I think the add method should put the object manifest onto swift first, before we upload the content when we upload a large image in chunks. 
-  manifest = "%s/%s-" % (location.container, location.obj)
-  headers = {'ETag': hashlib.md5("").hexdigest(), 'X-Object-Manifest': manifest}
+ the image content that have been uploaded can not be deleted. I think the add method of glance/swift/BaseStore should put the object manifest onto swift first, before we upload the content when we upload a large image in chunks.
+  manifest = "%s/%s-" % (location.container, location.obj)
+  headers = {'ETag': hashlib.md5("").hexdigest(), 'X-Object-Manifest': manifest}
  connection.put_object(location.container, location.obj,  None, headers=headers)
  the code above shoud put before the code we upload the image chunks.

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

Title:
  The add method of swift.py have a problem.When a large image is
  uploading and the glance-api is restarted, then we can not delete the
  image content that have been uploaded in swift

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

Bug description:
  1. upload a large image, for example 50G
  2. kill glance-api when image status:saving
  3. restart glance-api
  4. delete image

  the image content that have been uploaded can not be deleted. I think the add method of glance/swift/BaseStore should put the object manifest onto swift first, before we upload the content when we upload a large image in chunks.
   manifest = "%s/%s-" % (location.container, location.obj)
   headers = {'ETag': hashlib.md5("").hexdigest(), 'X-Object-Manifest': manifest}
  connection.put_object(location.container, location.obj,  None, headers=headers)
  the code above shoud put before the code we upload the image chunks.

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


Follow ups

References