)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"b9375683ee27c76f2cccb5fccd7860d120991e0c","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When trying to delete host that can be found in host_mappings"},{"line_number":10,"context_line":"but not in compute_nodes, current cellv2 delete_host will throw"},{"line_number":11,"context_line":"an exception but doesnot really handle it."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This patch tries to handle this exception and allow the delete"},{"line_number":14,"context_line":"operation to continue since it shows the host has gone anyway."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5f7c97a3_17dd946c","line":11,"range":{"start_line":11,"start_character":17,"end_line":11,"end_character":24},"updated":"2018-07-13 07:40:18.000000000","message":"does not\nor\ndoesn\u0027t","commit_id":"60ab969e699d844a1d1b66c127191babb391bbd8"},{"author":{"_account_id":25562,"name":"Chen","email":"dstbtgagt@foxmail.com","username":"chenn2"},"change_message_id":"51daf536767ec93a8e24ed10a789401294a48ca5","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When trying to delete host that can be found in host_mappings"},{"line_number":10,"context_line":"but not in compute_nodes, current cellv2 delete_host will throw"},{"line_number":11,"context_line":"an exception but doesnot really handle it."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This patch tries to handle this exception and allow the delete"},{"line_number":14,"context_line":"operation to continue since it shows the host has gone anyway."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5f7c97a3_2625ffbf","line":11,"range":{"start_line":11,"start_character":17,"end_line":11,"end_character":24},"in_reply_to":"5f7c97a3_17dd946c","updated":"2018-07-13 10:09:08.000000000","message":"Done","commit_id":"60ab969e699d844a1d1b66c127191babb391bbd8"}],"nova/cmd/manage.py":[{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"b9375683ee27c76f2cccb5fccd7860d120991e0c","unresolved":false,"context_lines":[{"line_number":1727,"context_line":"            instances \u003d objects.InstanceList.get_by_host(cctxt, host)"},{"line_number":1728,"context_line":"            try:"},{"line_number":1729,"context_line":"                nodes \u003d objects.ComputeNodeList.get_all_by_host(cctxt, host)"},{"line_number":1730,"context_line":"            except exception.ComputeHostNotFound:"},{"line_number":1731,"context_line":"                nodes \u003d []"},{"line_number":1732,"context_line":""},{"line_number":1733,"context_line":"        if instances:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_d735dca8","line":1730,"range":{"start_line":1730,"start_character":12,"end_line":1730,"end_character":49},"updated":"2018-07-13 07:40:18.000000000","message":"Yes, it raise a exception.ComputeHostNotFound when we get a empty results.\n \n[1] https://github.com/openstack/nova/blob/683fbe3c84ee70e817ffb8396fefb9ff6cd8830d/nova/db/sqlalchemy/api.py#L657","commit_id":"60ab969e699d844a1d1b66c127191babb391bbd8"}],"nova/tests/unit/test_nova_manage.py":[{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"d9d083f77691efcd5a2c74039ef8820c965cba11","unresolved":false,"context_lines":[{"line_number":2421,"context_line":"            context\u003dctxt, host\u003d\u0027fake-host\u0027, cell_mapping\u003dcm1)"},{"line_number":2422,"context_line":"        hm.create()"},{"line_number":2423,"context_line":""},{"line_number":2424,"context_line":"        mock_get_cn.return_value \u003d [mock.MagicMock(), mock.MagicMock()]"},{"line_number":2425,"context_line":""},{"line_number":2426,"context_line":"        self.assertEqual(0, self.commands.delete_host(uuidsentinel.cell1,"},{"line_number":2427,"context_line":"                                                      \u0027fake-host\u0027))"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_a74cc43f","line":2424,"range":{"start_line":2424,"start_character":0,"end_line":2424,"end_character":71},"updated":"2018-07-12 13:35:10.000000000","message":"It is not necessary.","commit_id":"6fa834e393557d160d433d5df8a4ba363942838c"},{"author":{"_account_id":25562,"name":"Chen","email":"dstbtgagt@foxmail.com","username":"chenn2"},"change_message_id":"08c6d47310461ff1b0b057f0d3f55636227f2025","unresolved":false,"context_lines":[{"line_number":2421,"context_line":"            context\u003dctxt, host\u003d\u0027fake-host\u0027, cell_mapping\u003dcm1)"},{"line_number":2422,"context_line":"        hm.create()"},{"line_number":2423,"context_line":""},{"line_number":2424,"context_line":"        mock_get_cn.return_value \u003d [mock.MagicMock(), mock.MagicMock()]"},{"line_number":2425,"context_line":""},{"line_number":2426,"context_line":"        self.assertEqual(0, self.commands.delete_host(uuidsentinel.cell1,"},{"line_number":2427,"context_line":"                                                      \u0027fake-host\u0027))"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_c0d0b855","line":2424,"range":{"start_line":2424,"start_character":0,"end_line":2424,"end_character":71},"in_reply_to":"5f7c97a3_a74cc43f","updated":"2018-07-13 01:52:51.000000000","message":"Done","commit_id":"6fa834e393557d160d433d5df8a4ba363942838c"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"d9d083f77691efcd5a2c74039ef8820c965cba11","unresolved":false,"context_lines":[{"line_number":2429,"context_line":"        self.assertEqual(\u0027\u0027, output)"},{"line_number":2430,"context_line":"        mock_get_by_host.assert_called_once_with("},{"line_number":2431,"context_line":"            test.MatchType(context.RequestContext), \u0027fake-host\u0027)"},{"line_number":2432,"context_line":"        mock_destroy.assert_called_once_with()"},{"line_number":2433,"context_line":""},{"line_number":2434,"context_line":""},{"line_number":2435,"context_line":"@ddt.ddt"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_672eac43","line":2432,"updated":"2018-07-12 13:35:10.000000000","message":"Add the following assertion:\n\n        mock_get_cn.assert_called_once_with(\n            test.MatchType(context.RequestContext), \u0027fake-host\u0027)","commit_id":"6fa834e393557d160d433d5df8a4ba363942838c"},{"author":{"_account_id":25562,"name":"Chen","email":"dstbtgagt@foxmail.com","username":"chenn2"},"change_message_id":"08c6d47310461ff1b0b057f0d3f55636227f2025","unresolved":false,"context_lines":[{"line_number":2429,"context_line":"        self.assertEqual(\u0027\u0027, output)"},{"line_number":2430,"context_line":"        mock_get_by_host.assert_called_once_with("},{"line_number":2431,"context_line":"            test.MatchType(context.RequestContext), \u0027fake-host\u0027)"},{"line_number":2432,"context_line":"        mock_destroy.assert_called_once_with()"},{"line_number":2433,"context_line":""},{"line_number":2434,"context_line":""},{"line_number":2435,"context_line":"@ddt.ddt"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_60c7649a","line":2432,"in_reply_to":"5f7c97a3_672eac43","updated":"2018-07-13 01:52:51.000000000","message":"Done","commit_id":"6fa834e393557d160d433d5df8a4ba363942838c"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"b9375683ee27c76f2cccb5fccd7860d120991e0c","unresolved":false,"context_lines":[{"line_number":2403,"context_line":"                       return_value\u003d[])"},{"line_number":2404,"context_line":"    @mock.patch.object(objects.HostMapping, \u0027destroy\u0027)"},{"line_number":2405,"context_line":"    @mock.patch.object(objects.ComputeNodeList, \u0027get_all_by_host\u0027,"},{"line_number":2406,"context_line":"                       side_effect\u003dexception.ComputeHostNotFound(host\u003d\u0027host0\u0027))"},{"line_number":2407,"context_line":"    def test_delete_host_success_compute_host_not_found(self, mock_get_cn,"},{"line_number":2408,"context_line":"                                                        mock_destroy,"},{"line_number":2409,"context_line":"                                                        mock_get_by_host):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_f78c9881","line":2406,"range":{"start_line":2406,"start_character":71,"end_line":2406,"end_character":76},"updated":"2018-07-13 07:40:18.000000000","message":"It seems here is \u0027fake-host\u0027, because L2424 we pass the \u0027fake-host\u0027, right?","commit_id":"60ab969e699d844a1d1b66c127191babb391bbd8"},{"author":{"_account_id":25562,"name":"Chen","email":"dstbtgagt@foxmail.com","username":"chenn2"},"change_message_id":"51daf536767ec93a8e24ed10a789401294a48ca5","unresolved":false,"context_lines":[{"line_number":2403,"context_line":"                       return_value\u003d[])"},{"line_number":2404,"context_line":"    @mock.patch.object(objects.HostMapping, \u0027destroy\u0027)"},{"line_number":2405,"context_line":"    @mock.patch.object(objects.ComputeNodeList, \u0027get_all_by_host\u0027,"},{"line_number":2406,"context_line":"                       side_effect\u003dexception.ComputeHostNotFound(host\u003d\u0027host0\u0027))"},{"line_number":2407,"context_line":"    def test_delete_host_success_compute_host_not_found(self, mock_get_cn,"},{"line_number":2408,"context_line":"                                                        mock_destroy,"},{"line_number":2409,"context_line":"                                                        mock_get_by_host):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_e6186784","line":2406,"range":{"start_line":2406,"start_character":71,"end_line":2406,"end_character":76},"in_reply_to":"5f7c97a3_f78c9881","updated":"2018-07-13 10:09:08.000000000","message":"Done","commit_id":"60ab969e699d844a1d1b66c127191babb391bbd8"},{"author":{"_account_id":25562,"name":"Chen","email":"dstbtgagt@foxmail.com","username":"chenn2"},"change_message_id":"cfc398bb027835dba8b64871f972920544c1a374","unresolved":false,"context_lines":[{"line_number":2403,"context_line":"                       return_value\u003d[])"},{"line_number":2404,"context_line":"    @mock.patch.object(objects.HostMapping, \u0027destroy\u0027)"},{"line_number":2405,"context_line":"    @mock.patch.object(objects.ComputeNodeList, \u0027get_all_by_host\u0027,"},{"line_number":2406,"context_line":"                       side_effect\u003dexception.ComputeHostNotFound(host\u003d\u0027host0\u0027))"},{"line_number":2407,"context_line":"    def test_delete_host_success_compute_host_not_found(self, mock_get_cn,"},{"line_number":2408,"context_line":"                                                        mock_destroy,"},{"line_number":2409,"context_line":"                                                        mock_get_by_host):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_6656972e","line":2406,"range":{"start_line":2406,"start_character":71,"end_line":2406,"end_character":76},"in_reply_to":"5f7c97a3_f78c9881","updated":"2018-07-13 10:06:42.000000000","message":"I guess here we just need to set a value for host, host0 or whatever. But yes for consistency I will take your advice.","commit_id":"60ab969e699d844a1d1b66c127191babb391bbd8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"28fed9055feab6c906debce84c424283c7f10c22","unresolved":false,"context_lines":[{"line_number":2400,"context_line":"            node.save.assert_called_once_with()"},{"line_number":2401,"context_line":""},{"line_number":2402,"context_line":"    @mock.patch.object(objects.InstanceList, \u0027get_by_host\u0027,"},{"line_number":2403,"context_line":"                       return_value\u003d[])"},{"line_number":2404,"context_line":"    @mock.patch.object(objects.HostMapping, \u0027destroy\u0027)"},{"line_number":2405,"context_line":"    @mock.patch.object(objects.ComputeNodeList, \u0027get_all_by_host\u0027,"},{"line_number":2406,"context_line":"        side_effect\u003dexception.ComputeHostNotFound(host\u003d\u0027fake-host\u0027))"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_cbe44c45","line":2403,"range":{"start_line":2403,"start_character":36,"end_line":2403,"end_character":38},"updated":"2018-07-13 15:23:55.000000000","message":"nit: normally this would be objects.InstanceList()","commit_id":"0ef4ed96d19a3576d67fdc9c1958610887d57ed4"}]}
