)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"96e07a88c7e1eed1ff6a8ca698abe4630b37bc5e","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When a request is made with X-OpenStack-Request-ID headers set then this"},{"line_number":10,"context_line":"value should be included in the headers of calls that this service makes"},{"line_number":11,"context_line":"so that the effects of a call can be traced throughout a cloud."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Include this header in any requests made with the plugin."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"7a016987_42112103","line":11,"updated":"2015-05-22 16:58:05.000000000","message":"As someone who frequently debugs OpenStack in the gate. This would only be marginally useful, and actually make things worse in many cases.\n\nWhen I see a specific query to an OpenStack REST API returns an unexpected error, I would like a way to quickly find all the logs in all the services related to that query. But I also need to differentiate multiple calls to the same service. For example nova may call neutron multiple times in a row. Having the same request ID for those separate neutron calls will make it much harder to debug. What I really want is to be able to rebuild the entire call graph. With the current proposal, debugging this case becomes harder then it is today:\n\n User -\u003e Nova\n Nova -\u003e Neutron\n Nova -\u003e Glance\n Nova -\u003e Neutron\n\nWhere the failure is somewhere in nova.\n\nWe shouldn\u0027t try to solve this case with timestamps, as we shouldn\u0027t assume times are synced close enough to make this feasible.","commit_id":"b4942a75c80c7be926c9164c97994f5d64ba84b2"},{"author":{"_account_id":1011,"name":"Tushar Patil","email":"tushar.vitthal.patil@gmail.com","username":"tpatil"},"change_message_id":"5356866b6b416e4d3ae0269de8c06d0a4d220009","unresolved":false,"context_lines":[{"line_number":13,"context_line":"Include this header in any requests made with the plugin."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"At this time I haven\u0027t included trying to create a request ID if one is"},{"line_number":16,"context_line":"not present. This is probably something that auth_token middleware"},{"line_number":17,"context_line":"should own."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Implements: bp request-helpers"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"1aca2d91_4292b058","line":16,"updated":"2015-05-07 23:01:38.000000000","message":"Most OpenStack services are getting request id from the request  environment with the key \"openstack.request_id\" and creating RequestContext which is used by oslo log library for logging purpose. Are you suggesting all these OpenStack services should make changes to read request id using header \"X-Openstack-Request-Id\" instead of \"openstack.request_id\"?\n\nNovaKeystoneContext\nhttps://github.com/openstack/nova/blob/master/nova/api/auth.py#L128\n\nCinderKeystoneContext\nhttps://github.com/openstack/cinder/blob/master/cinder/api/middleware/auth.py#L97\n\nNeutronKeystoneContext\nhttps://github.com/openstack/neutron/blob/master/neutron/auth.py#L49","commit_id":"b4942a75c80c7be926c9164c97994f5d64ba84b2"}],"keystonemiddleware/auth_token/__init__.py":[{"author":{"_account_id":1011,"name":"Tushar Patil","email":"tushar.vitthal.patil@gmail.com","username":"tpatil"},"change_message_id":"611e4d33c318011cd520f190f998ec2ff8401457","unresolved":false,"context_lines":[{"line_number":627,"context_line":"                user_auth_ref,"},{"line_number":628,"context_line":"                serv_auth_ref,"},{"line_number":629,"context_line":"                self._service_auth_session,"},{"line_number":630,"context_line":"                env.get(\u0027HTTP_X_OPENSTACK_REQUEST_ID\u0027))"},{"line_number":631,"context_line":""},{"line_number":632,"context_line":"        except exc.ServiceError as e:"},{"line_number":633,"context_line":"            self._LOG.critical(_LC(\u0027Unable to obtain admin token: %s\u0027), e)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aca2d91_9273a4b1","line":630,"updated":"2015-05-07 00:45:29.000000000","message":"Where is HTTP_X_OPENSTACK_REQUEST_ID request environment variable set?\nI think all OpenStack projects uses request_id middleware and it injects openstack.request_id in the request environment.\n\nRefer to https://github.com/openstack/oslo.middleware/blob/master/oslo_middleware/request_id.py#L36","commit_id":"b4942a75c80c7be926c9164c97994f5d64ba84b2"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"f4fad83f7adac4fab3e2dd014fe81ba7d3f69d80","unresolved":false,"context_lines":[{"line_number":627,"context_line":"                user_auth_ref,"},{"line_number":628,"context_line":"                serv_auth_ref,"},{"line_number":629,"context_line":"                self._service_auth_session,"},{"line_number":630,"context_line":"                env.get(\u0027HTTP_X_OPENSTACK_REQUEST_ID\u0027))"},{"line_number":631,"context_line":""},{"line_number":632,"context_line":"        except exc.ServiceError as e:"},{"line_number":633,"context_line":"            self._LOG.critical(_LC(\u0027Unable to obtain admin token: %s\u0027), e)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aca2d91_9e83abcc","line":630,"in_reply_to":"1aca2d91_9273a4b1","updated":"2015-05-07 05:16:54.000000000","message":"env[\u0027HTTP_X_OPENSTACK_REQUEST_ID\u0027] is functionally equivalent to request.headers[\u0027X-OpenStack-Request-ID\u0027], it\u0027s just how headers are saved. \n\nrequest_id middleware sets the request_id on the response from an api call. If this goes through it would be included with requests that the api service makes to other services. \n\nWhen writing this though i assumed that the request id was maintained across all requests. request_id middleware makes a new id for every request which i just dont see the point of.","commit_id":"b4942a75c80c7be926c9164c97994f5d64ba84b2"},{"author":{"_account_id":1011,"name":"Tushar Patil","email":"tushar.vitthal.patil@gmail.com","username":"tpatil"},"change_message_id":"5356866b6b416e4d3ae0269de8c06d0a4d220009","unresolved":false,"context_lines":[{"line_number":627,"context_line":"                user_auth_ref,"},{"line_number":628,"context_line":"                serv_auth_ref,"},{"line_number":629,"context_line":"                self._service_auth_session,"},{"line_number":630,"context_line":"                env.get(\u0027HTTP_X_OPENSTACK_REQUEST_ID\u0027))"},{"line_number":631,"context_line":""},{"line_number":632,"context_line":"        except exc.ServiceError as e:"},{"line_number":633,"context_line":"            self._LOG.critical(_LC(\u0027Unable to obtain admin token: %s\u0027), e)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aca2d91_e22c1c04","line":630,"in_reply_to":"1aca2d91_9e83abcc","updated":"2015-05-07 23:01:38.000000000","message":"I have applied this and dependent patch in my environment and tested nova to cinder call but I don\u0027t see \"X-Openstack-Request-Id\" in the request header on the cinder side. If I pass \"X-Openstack-Request-Id\" in the request header of nova request, then I can see it on the cinder side when nova makes a call to the cinder service.\n\nIf I understand you correctly, you are on the path of deprecating request_id middleware after functionality is added of generating a new request id in the authtoken middleware if it\u0027s not present. Please correct me If I\u0027m wrong.","commit_id":"b4942a75c80c7be926c9164c97994f5d64ba84b2"}],"keystonemiddleware/auth_token/_user_plugin.py":[{"author":{"_account_id":8300,"name":"Abhijeet Malawade","email":"abhijeet.malawade@gmail.com","username":"abhijeet"},"change_message_id":"0ef4956440f77f3e2ccc036ed4ca65315e441403","unresolved":false,"context_lines":[{"line_number":180,"context_line":"            if token:"},{"line_number":181,"context_line":"                headers[\u0027X-Service-Token\u0027] \u003d token"},{"line_number":182,"context_line":"            if self.request_id:"},{"line_number":183,"context_line":"                headers[\u0027X-OpenStack-Request-ID\u0027] \u003d self.request_id"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"        return headers"},{"line_number":186,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"1aca2d91_151e5963","line":183,"updated":"2015-05-07 06:33:49.000000000","message":"I don\u0027t think we should allow user to pass X-OpenStack-Request-ID in the request header.\nIf user is free to pass any value here, it is possible he/she may pass same value for multiple request and it would create more problems in troubleshooting cause of failure due to non-uniqueness of the request id.\n\nWe should give this control to the service provider to allow them to configure whether requests crossing service boundaries should use same request id or not.\n\nWe can make this possible by adding a new configuration parameter request_id_mapper_key.\n\nFor example nova making a call to cinder\n\nnova.conf\n[keystone_authtoken]\nrequest_id_mapper_key\u003duuid (This uuid will not be exposed to the user)\n\ncinder.conf\n[keystone_authtoken]\nrequest_id_mapper_key\u003duuid (same uuid as in nova.conf)\n\na) In the get_headers method here, it will inject header as\nheaders[CONF.request_id_mapper_key] \u003d self.request_id\n\nb) Now, in the request_id middleware, we can import this configuration parameter and check if uuid is present. If yes, then it will use it for processing the request further or else it will generate a new one.\n\nCode:\n\nif CONF.request_id_mapper_key in req.headers:\n    req_id \u003d req.headers[CONF.request_id_mapper_key]\nelse:\n    req_id \u003d context.generate_request_id()","commit_id":"b4942a75c80c7be926c9164c97994f5d64ba84b2"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"c7b04c5588a958b04fb37acd46315b97a069d108","unresolved":false,"context_lines":[{"line_number":185,"context_line":"        return headers"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    @property"},{"line_number":188,"context_line":"    def request_id(self):"},{"line_number":189,"context_line":"        return self._request_id"}],"source_content_type":"text/x-python","patch_set":6,"id":"3acd31a7_357ebc19","line":188,"updated":"2015-05-04 13:10:49.000000000","message":"Why is this a property if it just returns the value? You could have just used self.request_id instead of self._request_id.","commit_id":"b4942a75c80c7be926c9164c97994f5d64ba84b2"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"bb86b00b22d71eec15d08c2a1afa7fcd4bdddc2c","unresolved":false,"context_lines":[{"line_number":185,"context_line":"        return headers"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    @property"},{"line_number":188,"context_line":"    def request_id(self):"},{"line_number":189,"context_line":"        return self._request_id"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aca2d91_de600338","line":188,"in_reply_to":"3acd31a7_357ebc19","updated":"2015-05-07 05:17:59.000000000","message":"because i\u0027m trying to make this object read only as much as i can.","commit_id":"b4942a75c80c7be926c9164c97994f5d64ba84b2"}]}
