Artifacts: HTTP 500 when uploading a blob file without specified size

Bug #1488037 reported by Alexander Tivelkov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Undecided
Alexander Tivelkov

Bug Description

An attempt to upload a blob to an artifact without specifying the content length in a header causes HTTP 500 error in Glance API.

Tags: artifacts
tags: added: artifacts
Mike Fedosin (mfedosin)
Changed in glance:
status: New → Confirmed
Changed in glance:
assignee: nobody → Alexander Tivelkov (ativelkov)
status: Confirmed → In Progress
Changed in glance:
milestone: none → liberty-rc1
Changed in glance:
milestone: liberty-rc1 → mitaka-2
Revision history for this message
Nikhil Komawar (nikhil-komawar) wrote :
Changed in glance:
milestone: mitaka-2 → liberty-rc1
Revision history for this message
Alexander Tivelkov (ativelkov) wrote :

Seems like there are some wrong tags in the patches:
https://review.openstack.org/#/c/223558/ should not be merged as it has issues - and it is actually unrelated to this bug report.

Meanwhile https://review.openstack.org/#/c/216180/ seems to be complete and ready for approval, and it fixes exactly the issue described in this bug report.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/216180
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=b0bc1103abcf590845fcd125501ac821c28c4979
Submitter: Jenkins
Branch: master

commit b0bc1103abcf590845fcd125501ac821c28c4979
Author: Alexander Tivelkov <email address hidden>
Date: Mon Aug 24 13:30:46 2015 +0300

    Fixed an HTTP 500 on artifact blob upload

    If the HTTP PUT request to upload a binary file to an artifact does not
    contain a Content-size header, the length of the binary file should be
    detected during the upload.

    However, the unset content size variable was leading to an exception as
    its value (None) participates in some math operations during the upload.
    Setting the value to 0 (same is v2 API) fixes the issue.

    Closes-Bug: #1488037
    FastTrack

    Change-Id: Iadbd97899445b58c2c5bad961bca61cd6ab60d1a

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: liberty-rc1 → 11.0.0
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.