)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"1bafb497523179a98e35380b3b47a7d53729279c","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add ensure_thread_contain_context() to task_manager"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"For async/periodic tasks, the context of local thread is missing."},{"line_number":10,"context_line":"Set it with request context and this is useful to log the request_id"},{"line_number":11,"context_line":"in log messages."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I436bc0512fcf493424f14e12a17c69f686455a4c"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5aef4532_71e4003b","line":10,"updated":"2016-03-07 08:44:55.000000000","message":"Periodic tasks are not linked to any request. \"request_id\" should not be logged for them.","commit_id":"4dcb0c23d195bae15bd92f1ee1784d48f0e99ca9"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"39665c848629eece76be69f36ad0ee84cbeaac9f","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add ensure_thread_contain_context() to task_manager"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"For async/periodic tasks, the context of local thread is missing."},{"line_number":10,"context_line":"Set it with request context and this is useful to log the request_id"},{"line_number":11,"context_line":"in log messages."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I436bc0512fcf493424f14e12a17c69f686455a4c"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5aef4532_0d1fe16c","line":10,"in_reply_to":"5aef4532_072cf0a9","updated":"2016-03-09 09:36:42.000000000","message":"\u003e although all periodic tasks will share a same request_id. \n\nLooks like it should not be logged for periodic task if it\u0027s the same.","commit_id":"4dcb0c23d195bae15bd92f1ee1784d48f0e99ca9"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"8da2fbd28e8dc0677098c1641667307f1736a1c4","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add ensure_thread_contain_context() to task_manager"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"For async/periodic tasks, the context of local thread is missing."},{"line_number":10,"context_line":"Set it with request context and this is useful to log the request_id"},{"line_number":11,"context_line":"in log messages."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I436bc0512fcf493424f14e12a17c69f686455a4c"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5aef4532_d78eed2c","line":10,"in_reply_to":"5aef4532_0d1fe16c","updated":"2016-03-10 02:00:02.000000000","message":"hmm, I don\u0027t think so. \n1. Log the request-id even with the same id of periodic task can still help user to track the problem.\n2. As all non-periodic tasks have request-id log, log the periodic task will keep consistency. \n\nhere is a example:\nhttp://paste.openstack.org/show/489942/","commit_id":"4dcb0c23d195bae15bd92f1ee1784d48f0e99ca9"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"4e531214bec3753cce4419fc41a1e8dc4579b513","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add ensure_thread_contain_context() to task_manager"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"For async/periodic tasks, the context of local thread is missing."},{"line_number":10,"context_line":"Set it with request context and this is useful to log the request_id"},{"line_number":11,"context_line":"in log messages."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I436bc0512fcf493424f14e12a17c69f686455a4c"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5aef4532_072cf0a9","line":10,"in_reply_to":"5aef4532_71e4003b","updated":"2016-03-09 01:20:10.000000000","message":"Yes this is not from user but is passed within the admin_context to init_host(), although all periodic tasks will share a same request_id.  I think this is also helpful to track the problem like power state sync periodic action, WDYT?","commit_id":"4dcb0c23d195bae15bd92f1ee1784d48f0e99ca9"}],"ironic/conductor/task_manager.py":[{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"f31073c2f5c992f3bf47fa7bbcbeb6a13b8e1b54","unresolved":false,"context_lines":[{"line_number":152,"context_line":"    :returns: An instance of :class:`TaskManager`."},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    \"\"\""},{"line_number":155,"context_line":"    ensure_thread_contain_context(context)"},{"line_number":156,"context_line":"    return TaskManager(context, node_id, shared\u003dshared,"},{"line_number":157,"context_line":"                       driver_name\u003ddriver_name, purpose\u003dpurpose)"},{"line_number":158,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_893c8ae3","line":155,"range":{"start_line":155,"start_character":4,"end_line":155,"end_character":42},"updated":"2016-03-09 08:08:51.000000000","message":"if the note is required here to identify this is workaround or not？","commit_id":"4dcb0c23d195bae15bd92f1ee1784d48f0e99ca9"}],"ironic/tests/unit/conductor/test_task_manager.py":[{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"5346439fc83cf421f538882eae9a11cd65c44c60","unresolved":false,"context_lines":[{"line_number":726,"context_line":"        self.context \u003d mock.Mock(spec\u003dcontext.RequestContext)"},{"line_number":727,"context_line":""},{"line_number":728,"context_line":"    def test_thread_without_context(self, context_get_mock):"},{"line_number":729,"context_line":"        context_get_mock.return_value \u003d False"},{"line_number":730,"context_line":"        task_manager.ensure_thread_contain_context(self.context)"},{"line_number":731,"context_line":"        self.assertTrue(self.context.update_store.called)"},{"line_number":732,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa0719c6_b04e85bf","line":729,"range":{"start_line":729,"start_character":40,"end_line":729,"end_character":45},"updated":"2016-03-21 08:45:08.000000000","message":"nit: seems False is not proper here, get_current() will return the thread\u0027s current context which should be a context object or None, how about change it to None for the negative test.","commit_id":"add1884959bf5fc630584ceaa23a4293b6bd7da5"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"648c3396af7eef1d6be4ac7846f59c77afa0a49d","unresolved":false,"context_lines":[{"line_number":726,"context_line":"        self.context \u003d mock.Mock(spec\u003dcontext.RequestContext)"},{"line_number":727,"context_line":""},{"line_number":728,"context_line":"    def test_thread_without_context(self, context_get_mock):"},{"line_number":729,"context_line":"        context_get_mock.return_value \u003d False"},{"line_number":730,"context_line":"        task_manager.ensure_thread_contain_context(self.context)"},{"line_number":731,"context_line":"        self.assertTrue(self.context.update_store.called)"},{"line_number":732,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa0719c6_2e8851e7","line":729,"range":{"start_line":729,"start_character":40,"end_line":729,"end_character":45},"in_reply_to":"fa0719c6_b04e85bf","updated":"2016-03-21 09:40:31.000000000","message":"Good point.","commit_id":"add1884959bf5fc630584ceaa23a4293b6bd7da5"}]}
