response body is omitted incorrectly

Bug #1656981 reported by Steve Martinelli
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
keystoneauth
Fix Released
Medium
Samuel Pilla
python-keystoneclient
Fix Released
Medium
Tin Lam

Bug Description

An example from a rally run shows we are omitting the response body in debug mode when the Content-Type is set to "application/json; charset=UTF-8", when only log if Content-Type is "application/json".

Using http://10.20.86.84:9696/v2.0 as public network endpoint

REQ: curl -g -i -X PUT http://10.20.86.84:9696/v2.0/quotas/53958a9a5e0e421e8f3fc0810ad591de -H "User-Agent: openstacksdk/0.9.12 keystoneauth1/2.17.0 python-requests/2.12.4 CPython/2.7.12" -H "Content-Type: application/json" -H "X-Auth-Token: {SHA1}cef74d924494a0873c05e4e587ad7e8f3adfc73f" -d '{"quota": {"subnet": -1, "network": -1, "floatingip": -1, "subnetpool": -1, "port": -1, "security_group_rule": -1, "security_group": -1, "router": -1, "id": "53958a9a5e0e421e8f3fc0810ad591de"}}'

http://10.20.86.84:9696 "PUT /v2.0/quotas/53958a9a5e0e421e8f3fc0810ad591de HTTP/1.1" 400 103

RESP: [400] Content-Length: 103 Content-Type: application/json; charset=UTF-8 X-Openstack-Request-Id: req-2a769db6-e961-4ce1-9ec5-1d77231e2049 Date: Mon, 16 Jan 2017 21:49:37 GMT Connection: keep-alive

RESP BODY: Omitted, Content-Type is set to application/json; charset=UTF-8. Only application/json responses have their bodies logged.

http://logs.openstack.org/40/420940/2/check/gate-rally-dsvm-neutron-existing-users-rally/d62a957/console.html#_2017-01-16_21_49_37_644183

Tin Lam (lamt)
Changed in python-keystoneclient:
assignee: nobody → Tin Lam (tl3438)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-keystoneclient (master)

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

Changed in python-keystoneclient:
status: New → In Progress
Changed in python-keystoneclient:
assignee: Tin Lam (tl3438) → Steve Martinelli (stevemar)
Changed in python-keystoneclient:
assignee: Steve Martinelli (stevemar) → Tin Lam (tl3438)
Changed in python-keystoneclient:
assignee: Tin Lam (tl3438) → Steve Martinelli (stevemar)
Changed in python-keystoneclient:
assignee: Steve Martinelli (stevemar) → Tin Lam (tl3438)
Changed in keystoneauth:
assignee: nobody → Samuel Pilla (samuel.pilla)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-keystoneclient (master)

Reviewed: https://review.openstack.org/421076
Committed: https://git.openstack.org/cgit/openstack/python-keystoneclient/commit/?id=dcb719d0e51afa0253c144136b41f0e390c48c4c
Submitter: Jenkins
Branch: master

commit dcb719d0e51afa0253c144136b41f0e390c48c4c
Author: Tin Lam <email address hidden>
Date: Mon Jan 16 23:14:42 2017 -0600

    Fix response body being omitted in debug mode incorrectly

    In debug mode, when a response's header Content-Type is set
    to "application/json" with a parameter, i.e.,
    "application/json; charset=UTF-8". This patch set ignores
    the additional parameter and only match the mimetype.

    Change-Id: Ie8fcb1061e0e49b039436947524cfdc704c83846
    Closes-Bug: #1656981

Changed in python-keystoneclient:
status: In Progress → Fix Released
Changed in keystoneauth:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystoneauth (master)

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

Changed in keystoneauth:
importance: Undecided → Medium
Changed in python-keystoneclient:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystoneauth (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/421547

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystoneauth (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/421548

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-keystoneclient (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/421549

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-keystoneclient (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/421550

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

Reviewed: https://review.openstack.org/421319
Committed: https://git.openstack.org/cgit/openstack/keystoneauth/commit/?id=ed6ae95fa2ea529088d288e3e5f4099e8e1a2520
Submitter: Jenkins
Branch: master

commit ed6ae95fa2ea529088d288e3e5f4099e8e1a2520
Author: Samuel Pilla <email address hidden>
Date: Tue Jan 17 09:09:02 2017 -0600

    Correctly Omit Response Body in Debug Mode

    A response with header Content-Type set to "application/json; charset=UTF-8"
    would be omitted but not correctly logged. This patch set correctly omits
    and logs a response with the mentioned header.

    Co-Authored-By: Tin Lam <email address hidden>
    Change-Id: I21a185db4ca55ff16dba60f85bb229ffdacc2afa
    Closes-Bug: #1656981

Changed in keystoneauth:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/keystoneauth 2.18.0

This issue was fixed in the openstack/keystoneauth 2.18.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on keystoneauth (stable/mitaka)

Change abandoned by Steve Martinelli (<email address hidden>) on branch: stable/mitaka
Review: https://review.openstack.org/421548
Reason: we don't need this for mitaka

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-keystoneclient (stable/mitaka)

Change abandoned by Steve Martinelli (<email address hidden>) on branch: stable/mitaka
Review: https://review.openstack.org/421550
Reason: we don't need this for mitaka

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-keystoneclient (stable/newton)

Reviewed: https://review.openstack.org/421549
Committed: https://git.openstack.org/cgit/openstack/python-keystoneclient/commit/?id=7c40ff8466dc5e49f93752ecb998db864f8e5598
Submitter: Jenkins
Branch: stable/newton

commit 7c40ff8466dc5e49f93752ecb998db864f8e5598
Author: Tin Lam <email address hidden>
Date: Mon Jan 16 23:14:42 2017 -0600

    Fix response body being omitted in debug mode incorrectly

    In debug mode, when a response's header Content-Type is set
    to "application/json" with a parameter, i.e.,
    "application/json; charset=UTF-8". This patch set ignores
    the additional parameter and only match the mimetype.

    Change-Id: Ie8fcb1061e0e49b039436947524cfdc704c83846
    Closes-Bug: #1656981
    (cherry picked from commit dcb719d0e51afa0253c144136b41f0e390c48c4c)

tags: added: in-stable-newton
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystoneauth (stable/newton)

Reviewed: https://review.openstack.org/421547
Committed: https://git.openstack.org/cgit/openstack/keystoneauth/commit/?id=912d99bdf0f20ddc544dd05656a5ac28ec9acaac
Submitter: Jenkins
Branch: stable/newton

commit 912d99bdf0f20ddc544dd05656a5ac28ec9acaac
Author: Samuel Pilla <email address hidden>
Date: Tue Jan 17 09:09:02 2017 -0600

    Correctly Omit Response Body in Debug Mode

    A response with header Content-Type set to "application/json; charset=UTF-8"
    would be omitted but not correctly logged. This patch set correctly omits
    and logs a response with the mentioned header.

    Co-Authored-By: Tin Lam <email address hidden>
    Change-Id: I21a185db4ca55ff16dba60f85bb229ffdacc2afa
    Closes-Bug: #1656981
    (cherry-picked from: b1301e606d29a99da9c81d4c1627a6bba4b0ddcc)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-keystoneclient 3.10.0

This issue was fixed in the openstack/python-keystoneclient 3.10.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/keystoneauth 2.12.3

This issue was fixed in the openstack/keystoneauth 2.12.3 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-keystoneclient 3.5.1

This issue was fixed in the openstack/python-keystoneclient 3.5.1 release.

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.