A bit more detailed response when max_request_body_size is exceeded

Bug #1835363 reported by Johan Guldmyr on 2019-07-04
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo.middleware
Undecided
Johan Guldmyr

Bug Description

I spent a few days figuring out what was making the OS-FEDERATION mapping rules create/update API calls return "413 Entity Too Large" errors for our CentOS7/haproxy/apache/mod_wsgi/keystone/python2 setup.

To make this a bit easier for future users then I would like to include max_request_body_size in the error and also log the error.

Related for fixes in puppet-python: https://bugs.launchpad.net/puppet-keystone/+bug/1835161

Fix proposed to branch: master
Review: https://review.opendev.org/669061

Changed in oslo.middleware:
assignee: nobody → Johan Guldmyr (jguldmyr)
status: New → In Progress

Reviewed: https://review.opendev.org/669061
Committed: https://git.openstack.org/cgit/openstack/oslo.middleware/commit/?id=d6b74f5ce9af172d0b3a33234b1489d9af59e5fe
Submitter: Zuul
Branch: master

commit d6b74f5ce9af172d0b3a33234b1489d9af59e5fe
Author: Johan Guldmyr <email address hidden>
Date: Thu Jul 4 09:11:44 2019 +0300

    More details when logging 413 Entity Too Large

    I spent a few days figuring out what was making the OS-FEDERATION
    mapping rules create/update API calls return "413 Entity Too Large"
    errors for our CentOS7/haproxy/apache/mod_wsgi/keystone/python2 setup.

    To make this a bit easier for future users then I would like to include
    max_request_body_size and its value in the response and also log the
    error.

    Retaining the "Request is too large." bit in the message is intended to
    also make it easier to find where the limit is set.

    Resulting log error in keystone looks like:

    2019-07-04 06:52:13.217789 | ubuntu-bionic | INFO
    [oslo_middleware.sizelimit] Request is too large. Larger than
    max_request_body_size (114688).

    Change-Id: Ic66882afba25222ab8464ac9194c5002c8666db1
    Closes-Bug: #1835363
    Signed-off-by: Johan Guldmyr <email address hidden>

Changed in oslo.middleware:
status: In Progress → Fix Released

This issue was fixed in the openstack/oslo.middleware 3.38.1 release.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers