OpenStack Image Registry and Delivery Service (Glance)

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

Reported by Eoghan Glynn on 2012-02-14
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Glance
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) on 2012-02-14
Changed in glance:
importance: Undecided → Medium
assignee: nobody → Eoghan Glynn (eglynn)
milestone: none → essex-4
status: New → Confirmed
Eoghan Glynn (eglynn) on 2012-02-14
Changed in glance:
status: Confirmed → In Progress

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) on 2012-02-29
Changed in glance:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-04-05
Changed in glance:
milestone: essex-4 → 2012.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers