where pysendfile is unavailable, glance client sends small erratically-sized chunks

Bug #932183 reported by Eoghan Glynn
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Medium
Eoghan Glynn

Bug Description

The problem occurs when uploading image content via the glance client.

When the pysendfile package is available, image data is written to the wire as a sequnce of 64k-sized socket sends, as expected.

However, when pysendfile is unavailable, a chunked HTTP request is sent with small, erractically sized chunks. This is due to iteration over sys.stdin not producing a predicatable buffer size.

To fix, the HTTP chunk size for non-terminal chunks should revert to 64k as before.

Eoghan Glynn (eglynn)
Changed in glance:
importance: Undecided → Medium
assignee: nobody → Eoghan Glynn (eglynn)
milestone: none → essex-4
status: New → Confirmed
Eoghan Glynn (eglynn)
Changed in glance:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

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

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

Reviewed: https://review.openstack.org/4145
Committed: http://github.com/openstack/glance/commit/40b5ed733efd005e4a9ebbe0a0f7e6f844f9d043
Submitter: Jenkins
Branch: master

commit 40b5ed733efd005e4a9ebbe0a0f7e6f844f9d043
Author: Eoghan Glynn <email address hidden>
Date: Tue Feb 14 17:22:17 2012 +0000

    Ensure sane chunk size when pysendfile unavailable.

    Fixes lp 932183

    Previously, small and erratically-sized HTTP chunks were sent
    when pysendfile was unsupported on a particulat platform.

    Now, non-terminal chunks will be of size 64k as long data is
    available.

    Change-Id: Ic26e4d701ad22a21f06d7142f6ce91583acb5816

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: essex-4 → 2012.1
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.