The 'x-openstack-request-id' from cinder cannot be output to the log.

Bug #1328375 reported by Takashi Natsume
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Takashi Natsume

Bug Description

Cinder returns a response including 'x-openstack-request-id' in the HTTP response header when nova calls cinder.
But nova cannot output 'x-openstack-request-id' to the log( if the call is successful).
If nova outputs 'x-openstack-request-id' to the log, it will enable us to perform the analysis more efficiently.

Before:
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2014-06-10 10:34:13.636 DEBUG nova.volume.cinder [req-6ff36d30-8a39-499a-b40c-ea9ca8dafc25 admin admin] Cinderclient connection created using URL: http://10.0.2.15:8776/v1/5b25b7114cd34d41a9415bbc47a07c81 cinderclient /opt/stack/nova/nova/volume/cinder.py:94
2014-06-10 10:34:13.640 INFO urllib3.connectionpool [req-6ff36d30-8a39-499a-b40c-ea9ca8dafc25 admin admin] Starting new HTTP connection (1): 10.0.2.15
2014-06-10 10:34:13.641 DEBUG urllib3.connectionpool [req-6ff36d30-8a39-499a-b40c-ea9ca8dafc25 admin admin] Setting read timeout to None _make_request /usr/lib/python2.7/dist-packages/urllib3/connectionpool.py:375
2014-06-10 10:34:16.381 DEBUG urllib3.connectionpool [req-6ff36d30-8a39-499a-b40c-ea9ca8dafc25 admin admin] "POST /v1/5b25b7114cd34d41a9415bbc47a07c81/volumes/e4fe2d26-fccb-475e-9992-c8e25a418118/action HTTP/1.1" 200 447 _make_request /usr/lib/python2.7/dist-packages/urllib3/connectionpool.py:415
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

After:
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2014-06-10 13:40:19.423 DEBUG nova.volume.cinder [req-bfd42ba2-da4a-4687-8a60-d2a5eca7b88a admin admin] Cinderclient connection created using URL: http://10.0.2.15:8776/v1/d35af2c7a944440581879aecbc448203 cinderclient /opt/stack/nova/nova/volume/cinder.py:97
(snipped...)
2014-06-10 13:40:19.424 DEBUG cinderclient.client [req-bfd42ba2-da4a-4687-8a60-d2a5eca7b88a admin admin]
REQ: curl -i http://10.0.2.15:8776/v1/d35af2c7a944440581879aecbc448203/volumes/7a7d47c7-b31d-41bb-874f-f37dd175a4a4/action -X POST -H "X-Auth-Project-Id: d35af2c7a944440581879aecbc448203" -H "User-Agent: python-cinderclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: (snipped...)" -d '{"os-attach": {"instance_uuid": "cad01ef1-2728-4a9a-b4d6-da1a783a627b", "mountpoint": "/dev/vdb", "mode": "rw"}}'
 http_log_req /opt/stack/python-cinderclient/cinderclient/client.py:130
2014-06-10 13:40:19.427 INFO urllib3.connectionpool [req-bfd42ba2-da4a-4687-8a60-d2a5eca7b88a admin admin] Starting new HTTP connection (1): 10.0.2.15
2014-06-10 13:40:19.428 DEBUG urllib3.connectionpool [req-bfd42ba2-da4a-4687-8a60-d2a5eca7b88a admin admin] Setting read timeout to None _make_request /usr/lib/python2.7/dist-packages/urllib3/connectionpool.py:375
2014-06-10 13:40:19.909 DEBUG urllib3.connectionpool [req-bfd42ba2-da4a-4687-8a60-d2a5eca7b88a admin admin] "POST /v1/d35af2c7a944440581879aecbc448203/volumes/7a7d47c7-b31d-41bb-874f-f37dd175a4a4/action HTTP/1.1" 202 0 _make_request /usr/lib/python2.7/dist-packages/urllib3/connectionpool.py:415
(snipped...)
2014-06-10 13:40:19.910 DEBUG cinderclient.client [req-bfd42ba2-da4a-4687-8a60-d2a5eca7b88a admin admin] RESP: [202] CaseInsensitiveDict({'date': 'Tue, 10 Jun 2014 04:40:19 GMT', 'content-length': '0', 'content-type': 'text/html; charset=UTF-8', 'x-openstack-request-id': 'req-b0e7bccf-cc70-4646-93c0-bd94090cc5f0'})
RESP BODY:
 http_log_resp /opt/stack/python-cinderclient/cinderclient/client.py:139
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Changed in nova:
assignee: nobody → Takashi NATSUME (natsume-takashi)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
status: New → In Progress
Revision history for this message
Joe Gordon (jogo) wrote :
Revision history for this message
Takashi Natsume (natsume-takashi) wrote :

The existing blueprint defines nova response header.
But this bug report is about log output of cinder response header.

Revision history for this message
Chris Buccella (chris-buccella) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Takashi NATSUME (<email address hidden>) on branch: master
Review: https://review.openstack.org/98967

Changed in nova:
status: In Progress → Invalid
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.