Insufficient debug logs for token_client request

Bug #1503751 reported by Roxana Gherle
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Fix Released
Undecided
Roxana Gherle

Bug Description

When logging debug information for the request of token_client (both v2 and v3) we have some missing information about the request body, request headers and response body.
See output below for an example:

2015-10-06 19:27:46.944 | 2015-10-06 19:00:57,197 1650 INFO [tempest_lib.common.rest_client] Request (TrustsV3TestJSON:setUp): 201 POST http://127.0.0.1:5000/v3/auth/tokens
2015-10-06 19:27:46.944 | 2015-10-06 19:00:57,197 1650 DEBUG [tempest_lib.common.rest_client] Request - Headers: {}
2015-10-06 19:27:46.944 | Body: None
2015-10-06 19:27:46.944 | Response - Headers: {'x-subject-token': 'eb8d646f174a43e5bb6d283f44370100', 'content-type': 'application/json', 'connection': 'close', 'status': '201', 'server': 'Apache/2.4.7 (Ubuntu)', 'content-length': '3824', 'vary': 'X-Auth-Token', 'x-openstack-request-id': 'req-ad053694-a14b-41e9-ad2b-f79e420693bd', 'date': 'Tue, 06 Oct 2015 19:00:57 GMT'}
2015-10-06 19:27:46.944 | Body: None

In a debug mode we want to have those logs filled in with the necessary information in order to help troubleshooting and not misleading the readers of the logs.

Changed in tempest:
assignee: nobody → Roxana Gherle (roxana-gherle)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tempest-lib (master)

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

Changed in tempest:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tempest-lib (master)

Reviewed: https://review.openstack.org/232107
Committed: https://git.openstack.org/cgit/openstack/tempest-lib/commit/?id=3f1645b365550ac3f7a9da6a5dd156ba9ff3aacf
Submitter: Jenkins
Branch: master

commit 3f1645b365550ac3f7a9da6a5dd156ba9ff3aacf
Author: Roxana Gherle <email address hidden>
Date: Wed Oct 7 09:48:56 2015 -0700

    Add more debug info for token_client request

    Add the request headers and response body to the debug
    logs of the token_client request. Request body is omitted because
    of security reasons of not revealing passwords in the debug logs.
    Also, response body has sufficient information about the type of
    the token requested, therefore omitting request headers is ok.

    Closes-Bug: #1503751
    Change-Id: I830364e1df0e34398039442dc003fe46ca1db3a1

Changed in tempest:
status: In Progress → Fix Committed
Changed in tempest:
status: Fix Committed → Fix Released
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.