← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1462467] Re: exceptions.Duplicate not processed on v3 PUT/POST into blob property

 

Hi Inessa,

I do not see the v3 API merged into the repository, so marking this bug
invalid as it does not affect any of the current branches. Please add
these  details as comment to the relevant  review.

** Changed in: glance
       Status: New => 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/1462467

Title:
  exceptions.Duplicate not processed on v3 PUT/POST into blob property

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

Bug description:
  Any second PUT/POST into blob property leads to HTTP 500:

   File "/home/ina/projects/glance/glance/api/v3/artifacts.py", line 300, in upload
      setattr(artifact, attr, (data, size))
    File "/home/ina/projects/glance/glance/artifacts/domain/proxy.py", line 27, in setter
      return self.set_type_specific_property(attr, value)
    File "/home/ina/projects/glance/glance/artifacts/domain/proxy.py", line 99, in set_type_specific_property
      setattr(self.base, prop_name, value)
    File "/home/ina/projects/glance/glance/artifacts/domain/proxy.py", line 27, in setter
      return self.set_type_specific_property(attr, value)
    File "/home/ina/projects/glance/glance/artifacts/location.py", line 76, in set_type_specific_property
      blob_proxy.upload_to_store(data, size)
    File "/home/ina/projects/glance/glance/artifacts/location.py", line 144, in upload_to_store
      context=self.context)
    File "/home/ina/projects/glance/.venv/local/lib/python2.7/site-packages/glance_store/backend.py", line 364, in add_to_backend
      return store_add_to_backend(image_id, data, size, store, context)
    File "/home/ina/projects/glance/.venv/local/lib/python2.7/site-packages/glance_store/backend.py", line 339, in store_add_to_backend
      context=context)
    File "/home/ina/projects/glance/.venv/local/lib/python2.7/site-packages/glance_store/capabilities.py", line 226, in op_checker
      return store_op_fun(store, *args, **kwargs)
    File "/home/ina/projects/glance/.venv/local/lib/python2.7/site-packages/glance_store/_drivers/filesystem.py", line 589, in add
      raise exceptions.Duplicate(image=filepath)
  Duplicate: Image /opt/stack/data/glance/images/e7b0e397-4948-4d6d-a3f8-265f2a396a79.image_file already exists
  2015-06-05 20:28:34.031 22433 INFO eventlet.wsgi.server [req-0bf9bc64-2ef7-4ae4-9eaa-e56b88819f9a - - - - -] 127.0.0.1 - - [05/Jun/2015 20:28:34] "PUT /v3/artifacts/myartifact/v2.0/e7b0e397-4948-4d6d-a3f8-265f2a396a79/image_file HTTP/1.1" 500 139 0.018206

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


References