avoid calling len in sizelimit middleware

Bug #1131857 reported by Dan Prince
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
High
Dan Prince
OpenStack Compute (nova)
Fix Released
High
Dan Prince

Bug Description

Nova's sizelimit middleware should avoid using len() which could cause extra memory buffering to occur on large requests.

Dan Prince (dan-prince)
Changed in nova:
assignee: nobody → Dan Prince (dan-prince)
importance: Undecided → High
status: New → In Progress
Dan Prince (dan-prince)
Changed in nova:
milestone: none → grizzly-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/22033
Committed: http://github.com/openstack/nova/commit/20fb97df97cdfcbc1d98a0b1f7d94806d996e274
Submitter: Jenkins
Branch: master

commit 20fb97df97cdfcbc1d98a0b1f7d94806d996e274
Author: Dan Prince <email address hidden>
Date: Fri Feb 15 10:41:30 2013 -0500

    Updates to OSAPI sizelimit middleware.

    Updates the OSAPI sizelimit middleware so that we use avoid calling
    len on a request body which could cause a really large request
    to get buffered into memory.

    Also updates the middleware to return HTTP 413 which is a more
    correct error code in this case (previously it returned just 400).

    Fixes LP Bug #1131857.

    Change-Id: Id8bc5eeb0fba9482809edd12543a75163e1227e9

Changed in nova:
status: In Progress → Fix Committed
Dan Prince (dan-prince)
Changed in cinder:
assignee: nobody → Dan Prince (dan-prince)
importance: Undecided → High
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Changed in cinder:
milestone: none → grizzly-rc2
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/24873
Committed: http://github.com/openstack/cinder/commit/3fe81851bab39a1466d8744b372b5a287b4db93d
Submitter: Jenkins
Branch: master

commit 3fe81851bab39a1466d8744b372b5a287b4db93d
Author: Dan Prince <email address hidden>
Date: Tue Mar 19 19:37:47 2013 -0400

    Updates to OSAPI sizelimit middleware.

    Updates the OSAPI sizelimit middleware so that we use avoid calling
    len on a request body which could cause a really large request
    to get buffered into memory.

    Also updates the middleware to return HTTP 413 which is a more
    correct error code in this case (previously it returned just 400).

    Fixes LP Bug #1131857.

    Change-Id: Iff6cb0c24bc21e5a1d5dd4cf29acb0b4ee221708

Changed in cinder:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (milestone-proposed)

Fix proposed to branch: milestone-proposed
Review: https://review.openstack.org/25105

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (milestone-proposed)

Reviewed: https://review.openstack.org/25105
Committed: http://github.com/openstack/cinder/commit/d87259417c53d464dd3ec2b399faf22e65e1265c
Submitter: Jenkins
Branch: milestone-proposed

commit d87259417c53d464dd3ec2b399faf22e65e1265c
Author: Dan Prince <email address hidden>
Date: Tue Mar 19 19:37:47 2013 -0400

    Updates to OSAPI sizelimit middleware.

    Updates the OSAPI sizelimit middleware so that we use avoid calling
    len on a request body which could cause a really large request
    to get buffered into memory.

    Also updates the middleware to return HTTP 413 which is a more
    correct error code in this case (previously it returned just 400).

    Fixes LP Bug #1131857.

    Change-Id: Iff6cb0c24bc21e5a1d5dd4cf29acb0b4ee221708
    (cherry picked from commit 3fe81851bab39a1466d8744b372b5a287b4db93d)

Changed in cinder:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-rc1 → 2013.1
Thierry Carrez (ttx)
Changed in cinder:
milestone: grizzly-rc2 → 2013.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.