)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"f0aefc87fc6b651e924fe444c2b2297c0bf59cf7","unresolved":false,"context_lines":[{"line_number":14,"context_line":"resulting in the revision for the port being deleted even tho the port"},{"line_number":15,"context_line":"is still in the database."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Instead of giving a pass on the RowNotFound exception, this patch is"},{"line_number":18,"context_line":"logging the error and re-raising it without deleting the revision."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: I25b93b7c080403fc38365b638e4e03298b447d0f"},{"line_number":21,"context_line":"Partial-Bug: #1874733"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"1f493fa4_2d3fb4b4","line":18,"range":{"start_line":17,"start_character":0,"end_line":18,"end_character":66},"updated":"2020-04-27 12:18:10.000000000","message":"I may be wrong but IMHO this is also dangerous. Let me explain:\n\n- If an error occurs while deleting a port, let\u0027s say because the DNS entries associated to that port have already been deleted, then the rev number is not deleted.\n- This will make the Maintenance task to attempt the deletion of the port in OVN in (at most) 5 minutes.\n- This deletion will likely fail for the same reason\n- This repeats forever\n\nIn this case, the bug that this patch is partially addressing will still be there as instances with \"duplicated\" IP addresses will be unable to delete metadata.\n\nI think that a better approach would be to use if_exists\u003dTrue in the txn commands and ignore the RowNotFound for the associated objects. For example, if we leave behind a DNS entry for whatever reason it\u0027d be harmless (and fixable) but if we don\u0027t delete the port it\u0027ll have the consequences described in the bug.\n\nThoughts?","commit_id":"ef2260441d56036b42fc71b0f03b70a4a02fd954"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"938b3a798f28b6bec786ece2a1d078511882e750","unresolved":false,"context_lines":[{"line_number":14,"context_line":"resulting in the revision for the port being deleted even tho the port"},{"line_number":15,"context_line":"is still in the database."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Instead of giving a pass on the RowNotFound exception, this patch is"},{"line_number":18,"context_line":"logging the error and re-raising it without deleting the revision."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: I25b93b7c080403fc38365b638e4e03298b447d0f"},{"line_number":21,"context_line":"Partial-Bug: #1874733"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"1f493fa4_cd0610cf","line":18,"range":{"start_line":17,"start_character":0,"end_line":18,"end_character":66},"in_reply_to":"1f493fa4_2d3fb4b4","updated":"2020-04-27 12:27:37.000000000","message":"I don\u0027t agree with the last two bullet points here. If the DNS entry is already, the next time we attempt to delete the port the DNS entry will not be included in the transaction. The idea is prevent the maintenance task to lose track of the resources it has to fix (even if it takes 2 cycles, we are aiming to eventual consistency of dbs).\n\nI like the if_exists\u003dTrue idea as well but I think both changes complement each other.\n\nAlso, ports are the only resource where we were checking for RowNotFound.","commit_id":"ef2260441d56036b42fc71b0f03b70a4a02fd954"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"cbd3e6f19a409ee61345d7bd9d3e64c48b28d2be","unresolved":false,"context_lines":[{"line_number":14,"context_line":"resulting in the revision for the port being deleted even tho the port"},{"line_number":15,"context_line":"is still in the database."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Instead of giving a pass on the RowNotFound exception, this patch is"},{"line_number":18,"context_line":"logging the error and re-raising it without deleting the revision."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: I25b93b7c080403fc38365b638e4e03298b447d0f"},{"line_number":21,"context_line":"Partial-Bug: #1874733"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"1f493fa4_0ddbd84e","line":18,"range":{"start_line":17,"start_character":0,"end_line":18,"end_character":66},"in_reply_to":"1f493fa4_cd0610cf","updated":"2020-04-27 12:29:16.000000000","message":"Fair enough! Thanks a lot for clarifying, it makes sense.","commit_id":"ef2260441d56036b42fc71b0f03b70a4a02fd954"}],"neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py":[{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"792cea778792fcdde9fcb650663c611a55435ea3","unresolved":false,"context_lines":[{"line_number":717,"context_line":"    def delete_port(self, context, port_id, port_object\u003dNone):"},{"line_number":718,"context_line":"        try:"},{"line_number":719,"context_line":"            self._delete_port(port_id, port_object\u003dport_object)"},{"line_number":720,"context_line":"        except Exception as e:"},{"line_number":721,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":722,"context_line":"                LOG.error(\u0027Failed to delete port %(port)s. Error: \u0027"},{"line_number":723,"context_line":"                          \u0027%(error)s\u0027, {\u0027port\u0027: port_id, \u0027error\u0027: e})"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f493fa4_ba2f7d3d","line":720,"range":{"start_line":720,"start_character":8,"end_line":720,"end_character":30},"updated":"2020-04-27 07:55:54.000000000","message":"Can we cover this with ut?","commit_id":"5bb1e686c6f16ac2b1c5990ac61c6abfe3d09771"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"deb0e57784899754bfd31bb19997dd87d9e8d451","unresolved":false,"context_lines":[{"line_number":717,"context_line":"    def delete_port(self, context, port_id, port_object\u003dNone):"},{"line_number":718,"context_line":"        try:"},{"line_number":719,"context_line":"            self._delete_port(port_id, port_object\u003dport_object)"},{"line_number":720,"context_line":"        except Exception as e:"},{"line_number":721,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":722,"context_line":"                LOG.error(\u0027Failed to delete port %(port)s. Error: \u0027"},{"line_number":723,"context_line":"                          \u0027%(error)s\u0027, {\u0027port\u0027: port_id, \u0027error\u0027: e})"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f493fa4_37c42391","line":720,"range":{"start_line":720,"start_character":8,"end_line":720,"end_character":30},"in_reply_to":"1f493fa4_ba2f7d3d","updated":"2020-04-27 10:48:13.000000000","message":"++ will do","commit_id":"5bb1e686c6f16ac2b1c5990ac61c6abfe3d09771"}],"neutron/tests/unit/plugins/ml2/drivers/ovn/mech_driver/test_mech_driver.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"dd48da445aca1f298c0cc5ada641c43f9f25d8ab","unresolved":false,"context_lines":[{"line_number":784,"context_line":"    @mock.patch.object(ovn_client.OVNClient, \u0027_delete_port\u0027)"},{"line_number":785,"context_line":"    def test_delete_port_exception_delete_revision(self, mock_del_port,"},{"line_number":786,"context_line":"                                                   mock_del_rev):"},{"line_number":787,"context_line":"        mock_del_port.side_effect \u003d Exception(\u0027BoOoOoOoOmmmmm!!!\u0027)"},{"line_number":788,"context_line":"        with self.network(set_context\u003dTrue, tenant_id\u003d\u0027test\u0027) as net:"},{"line_number":789,"context_line":"            with self.subnet(network\u003dnet) as subnet:"},{"line_number":790,"context_line":"                with self.port(subnet\u003dsubnet,"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f493fa4_63641623","line":787,"range":{"start_line":787,"start_character":47,"end_line":787,"end_character":61},"updated":"2020-04-28 09:31:59.000000000","message":"great message :D","commit_id":"ef2260441d56036b42fc71b0f03b70a4a02fd954"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"d96b97851b8f4cdec4c0ff1eb5538a1db7934f11","unresolved":false,"context_lines":[{"line_number":784,"context_line":"    @mock.patch.object(ovn_client.OVNClient, \u0027_delete_port\u0027)"},{"line_number":785,"context_line":"    def test_delete_port_exception_delete_revision(self, mock_del_port,"},{"line_number":786,"context_line":"                                                   mock_del_rev):"},{"line_number":787,"context_line":"        mock_del_port.side_effect \u003d Exception(\u0027BoOoOoOoOmmmmm!!!\u0027)"},{"line_number":788,"context_line":"        with self.network(set_context\u003dTrue, tenant_id\u003d\u0027test\u0027) as net:"},{"line_number":789,"context_line":"            with self.subnet(network\u003dnet) as subnet:"},{"line_number":790,"context_line":"                with self.port(subnet\u003dsubnet,"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f493fa4_db12ef61","line":787,"range":{"start_line":787,"start_character":47,"end_line":787,"end_character":61},"in_reply_to":"1f493fa4_63641623","updated":"2020-04-30 14:17:34.000000000","message":"lol","commit_id":"ef2260441d56036b42fc71b0f03b70a4a02fd954"}]}
