VMware store: Attribute error while retrying image upload

Bug #1413852 reported by Sabari Murugesan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Medium
Sabari Murugesan
glance_store
Fix Released
High
Sabari Murugesan

Bug Description

In case of unauthenticated session, vmware store retries to upload the image data but fails when seeking to reposition the file.

2015-01-22 19:12:31.883 20624 ERROR glance.api.v1.upload_utils [e5be8f01-4bbb-4a1c-9721-495615e5e5cb 65dc7965ee13438e9ae706d4d42d2f65 087a197802df458dac65c1060a8e4cd4 - - -] Failed to upload image fa4a3308-917a-4899-8905-66333955cdfb
2015-01-22 19:12:31.883 20624 TRACE glance.api.v1.upload_utils Traceback (most recent call last):
2015-01-22 19:12:31.883 20624 TRACE glance.api.v1.upload_utils File "/opt/stack/glance/glance/api/v1/upload_utils.py", line 107, in upload_data_to_store
2015-01-22 19:12:31.883 20624 TRACE glance.api.v1.upload_utils context=req.context)
2015-01-22 19:12:31.883 20624 TRACE glance.api.v1.upload_utils File "/opt/stack/glance_store/glance_store/backend.py", line 318, in store_add_to_backend
2015-01-22 19:12:31.883 20624 TRACE glance.api.v1.upload_utils context=context)
2015-01-22 19:12:31.883 20624 TRACE glance.api.v1.upload_utils File "/opt/stack/glance_store/glance_store/_drivers/vmware_datastore.py", line 359, in add
2015-01-22 19:12:31.883 20624 TRACE glance.api.v1.upload_utils image_file.rewind()
2015-01-22 19:12:31.883 20624 TRACE glance.api.v1.upload_utils File "/opt/stack/glance_store/glance_store/_drivers/vmware_datastore.py", line 124, in rewind
2015-01-22 19:12:31.883 20624 TRACE glance.api.v1.upload_utils self.data.seek(0)
2015-01-22 19:12:31.883 20624 TRACE glance.api.v1.upload_utils AttributeError: 'CooperativeReader' object has no attribute 'seek'
2015-01-22 19:12:31.883 20624 TRACE glance.api.v1.upload_utils

Changed in glance:
assignee: nobody → Sabari Murugesan (smurugesan)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance_store (master)

Fix proposed to branch: master
Review: https://review.openstack.org/149515

Changed in glance:
status: New → In Progress
Changed in glance:
importance: Undecided → Medium
Changed in glance-store:
assignee: nobody → Sabari Murugesan (smurugesan)
status: New → In Progress
importance: Undecided → High
Changed in glance:
status: In Progress → Opinion
Changed in glance:
status: Opinion → In Progress
Changed in glance-store:
milestone: none → v0.1.11
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance_store (master)

Reviewed: https://review.openstack.org/149515
Committed: https://git.openstack.org/cgit/openstack/glance_store/commit/?id=632ce4000a303ece3dc0e497a7bdaaa72d396648
Submitter: Jenkins
Branch: master

commit 632ce4000a303ece3dc0e497a7bdaaa72d396648
Author: Sabari Kumar Murugesan <email address hidden>
Date: Thu Jan 22 16:06:36 2015 -0800

    Remove retry on failed uploads to VMware datastore

    VMware store retries to upload the image data but fails when
    seeking to reposition the file. Since the image_file is not
    seekable, we can never retry from the beginning. Also, the
    backend datastore server does not support resumable upload.

    Thus,
    1. Removing the retry logic in store.add().
    2. Replace non-existing UnexpectedStatus with BackendException.

    Closes-Bug: #1413852

    Change-Id: I453a14cb832c07c8cd932a3db7b4a34a80a73116

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
milestone: none → kilo-2
status: Fix Committed → Fix Released
Changed in glance-store:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
milestone: kilo-2 → 2015.1.0
Changed in glance-store:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.