)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"13dfa637ca964661b6161804fc1a3ff4582828ef","unresolved":true,"context_lines":[{"line_number":4,"context_line":"Commit:     elajkat \u003clajos.katona@est.tech\u003e"},{"line_number":5,"context_line":"CommitDate: 2022-07-05 09:57:54 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"[sqlalchemy-20] Missing DB context decorator for update_floatingip"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: Ifdb008c2402aa24766cbd30dd53458599076c955"},{"line_number":10,"context_line":"Closes-Bug: #1980721"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"bd6e5022_a7b29828","line":7,"range":{"start_line":7,"start_character":49,"end_line":7,"end_character":66},"updated":"2022-07-05 08:09:29.000000000","message":"nit: update_floatingip_status","commit_id":"fe8451bf17223da572f0f530f51119655b785358"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"f35fa80fc13909a456014730934ad1751ee5dd2b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"a8e89d96_e1b43588","updated":"2022-07-05 08:39:34.000000000","message":"-1 to make my comment visible","commit_id":"123f6029cf1908797f89bef2c6e93b69fe4341f3"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"ed33c5bfe15ae816305312c7cae5593d08e71f6b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"c2a15b78_4dae3db9","updated":"2022-07-06 15:03:15.000000000","message":"Once merged, let\u0027s track the CI to check if we see this error again.\n\nBut I\u0027m confident with this patch.","commit_id":"65bb30ddf8c11fe8896b914ff88f8a7afd5cf64d"}],"neutron/db/l3_db.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"6dfb2cfaa69e5d78cc8a069d51b826d296e0f0b6","unresolved":true,"context_lines":[{"line_number":1552,"context_line":"        return floatingip"},{"line_number":1553,"context_line":""},{"line_number":1554,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1555,"context_line":"    def update_floatingip_status(self, context, floatingip_id, status):"},{"line_number":1556,"context_line":"        \"\"\"Update operational status for floating IP in neutron DB.\"\"\""},{"line_number":1557,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":1558,"context_line":"            return l3_obj.FloatingIP.update_object("}],"source_content_type":"text/x-python","patch_set":1,"id":"281165eb_629b090e","line":1555,"range":{"start_line":1555,"start_character":8,"end_line":1555,"end_character":32},"updated":"2022-07-05 08:29:27.000000000","message":"This method is always called from inside a context [1]. This is because most of the times this operation must be done in sync with other DB operations. What we need to do here is:\n1) Remove the retry decorator from this method\n2) Find the places this method is called and decorated them with retry methods (if needed).\n\n[1]https://codesearch.openstack.org/?q\u003dupdate_floatingip_status\u0026i\u003dnope\u0026literal\u003dnope\u0026files\u003d\u0026excludeFiles\u003d\u0026repos\u003dopenstack/neutron","commit_id":"fe8451bf17223da572f0f530f51119655b785358"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"5fd93da31fd9dcf8a948e2c43f49a5082d52c012","unresolved":true,"context_lines":[{"line_number":1552,"context_line":"        return floatingip"},{"line_number":1553,"context_line":""},{"line_number":1554,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1555,"context_line":"    def update_floatingip_status(self, context, floatingip_id, status):"},{"line_number":1556,"context_line":"        \"\"\"Update operational status for floating IP in neutron DB.\"\"\""},{"line_number":1557,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":1558,"context_line":"            return l3_obj.FloatingIP.update_object("}],"source_content_type":"text/x-python","patch_set":1,"id":"4c43269d_c1a905fd","line":1555,"range":{"start_line":1555,"start_character":8,"end_line":1555,"end_character":32},"in_reply_to":"281165eb_629b090e","updated":"2022-07-05 11:20:33.000000000","message":"Thanks.\nWhat I am not sure is if I have to add extra decorator to [1], from where the plugin\u0027s update_floatingip_status is called, and it is inside a ovn_nb transaction only, but can\u0027t see if it is in the distance also called from inside a db transaction\n\n[1]: https://opendev.org/openstack/neutron/src/branch/master/neutron/services/portforwarding/drivers/ovn/driver.py#L254-L273","commit_id":"fe8451bf17223da572f0f530f51119655b785358"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"1ddcae4a8281e6c7706a3236a85cd09de3dad3b2","unresolved":true,"context_lines":[{"line_number":1552,"context_line":"        return floatingip"},{"line_number":1553,"context_line":""},{"line_number":1554,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1555,"context_line":"    def update_floatingip_status(self, context, floatingip_id, status):"},{"line_number":1556,"context_line":"        \"\"\"Update operational status for floating IP in neutron DB.\"\"\""},{"line_number":1557,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":1558,"context_line":"            return l3_obj.FloatingIP.update_object("}],"source_content_type":"text/x-python","patch_set":1,"id":"e0e89d3e_fbfed747","line":1555,"range":{"start_line":1555,"start_character":8,"end_line":1555,"end_character":32},"in_reply_to":"4c43269d_c1a905fd","updated":"2022-07-05 11:45:15.000000000","message":"I think we need to handle the following calls in a different way:\n- OVNL3RouterPLugin.update_floatingip_status\n- OVN_portForwarding._handle_notification\n\nThose calls to this method are not inside a DB context or a retry context.\n\nI\u0027m ok with removing this decorator from this method here. But in OVN we are not using any retry decorator for any parent method. In order to avoid problems with this call, I think we can implement a public method on ovn_l3.plugin, and use it there and in the port forwarding plugin. This method will just call L3_NAT_dbonly_mixin.update_floatingip_status with a retry decorator.\n\nAbout [1], we are safe: this context is an OVN DB transaction, not a Neutron DB context.\n\n[1]https://opendev.org/openstack/neutron/src/branch/master/neutron/services/portforwarding/drivers/ovn/driver.py#L254-L273","commit_id":"fe8451bf17223da572f0f530f51119655b785358"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"29a962f736ee1e972efbe52cd32242af3ce8e400","unresolved":true,"context_lines":[{"line_number":1552,"context_line":"        return floatingip"},{"line_number":1553,"context_line":""},{"line_number":1554,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1555,"context_line":"    def update_floatingip_status(self, context, floatingip_id, status):"},{"line_number":1556,"context_line":"        \"\"\"Update operational status for floating IP in neutron DB.\"\"\""},{"line_number":1557,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":1558,"context_line":"            return l3_obj.FloatingIP.update_object("}],"source_content_type":"text/x-python","patch_set":1,"id":"111c5910_bfba3e87","line":1555,"range":{"start_line":1555,"start_character":8,"end_line":1555,"end_character":32},"in_reply_to":"e0e89d3e_fbfed747","updated":"2022-07-06 13:23:42.000000000","message":"I added a method update_floatingip_status_retry, https://review.opendev.org/c/openstack/neutron/+/848701/1..4/neutron/services/ovn_l3/plugin.py#298, as I see from portforwarding.drivers.ovn.driver.OVNPortForwarding calls the OVNL3RouterPlugin.update_floatingip_status, so this new method covers these cases.","commit_id":"fe8451bf17223da572f0f530f51119655b785358"},{"author":{"_account_id":13861,"name":"yatin","email":"ykarel@redhat.com","username":"yatinkarel"},"change_message_id":"234b65741046c4d1c4c444a0e2120f9b3d91fc23","unresolved":true,"context_lines":[{"line_number":1553,"context_line":""},{"line_number":1554,"context_line":"    def update_floatingip_status(self, context, floatingip_id, status):"},{"line_number":1555,"context_line":"        \"\"\"Update operational status for floating IP in neutron DB.\"\"\""},{"line_number":1556,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":1557,"context_line":"            return l3_obj.FloatingIP.update_object("},{"line_number":1558,"context_line":"                context, {\u0027status\u0027: status}, id\u003dfloatingip_id)"},{"line_number":1559,"context_line":""},{"line_number":1560,"context_line":"    @registry.receives(resources.PORT, [events.PRECOMMIT_DELETE])"},{"line_number":1561,"context_line":"    def _precommit_delete_port_callback("}],"source_content_type":"text/x-python","patch_set":4,"id":"5f27a498_542ec935","line":1558,"range":{"start_line":1556,"start_character":1,"end_line":1558,"end_character":62},"updated":"2022-07-07 06:41:48.000000000","message":"i didn\u0027t got why the writer context needed here if context is already used in the calling method https://opendev.org/openstack/neutron/src/branch/master/neutron/api/rpc/handlers/l3_rpc.py#L267","commit_id":"65bb30ddf8c11fe8896b914ff88f8a7afd5cf64d"},{"author":{"_account_id":13861,"name":"yatin","email":"ykarel@redhat.com","username":"yatinkarel"},"change_message_id":"cfacce9855e55956e93f743d0b7d5b615628ed11","unresolved":true,"context_lines":[{"line_number":1553,"context_line":""},{"line_number":1554,"context_line":"    def update_floatingip_status(self, context, floatingip_id, status):"},{"line_number":1555,"context_line":"        \"\"\"Update operational status for floating IP in neutron DB.\"\"\""},{"line_number":1556,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":1557,"context_line":"            return l3_obj.FloatingIP.update_object("},{"line_number":1558,"context_line":"                context, {\u0027status\u0027: status}, id\u003dfloatingip_id)"},{"line_number":1559,"context_line":""},{"line_number":1560,"context_line":"    @registry.receives(resources.PORT, [events.PRECOMMIT_DELETE])"},{"line_number":1561,"context_line":"    def _precommit_delete_port_callback("}],"source_content_type":"text/x-python","patch_set":4,"id":"1a70b520_a4336691","line":1558,"range":{"start_line":1556,"start_character":1,"end_line":1558,"end_character":62},"in_reply_to":"2365457b_c50d396e","updated":"2022-07-08 10:55:01.000000000","message":"Ok Thanks","commit_id":"65bb30ddf8c11fe8896b914ff88f8a7afd5cf64d"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"8c5ddb0084cd1c47d77555ecdca726b1569109aa","unresolved":true,"context_lines":[{"line_number":1553,"context_line":""},{"line_number":1554,"context_line":"    def update_floatingip_status(self, context, floatingip_id, status):"},{"line_number":1555,"context_line":"        \"\"\"Update operational status for floating IP in neutron DB.\"\"\""},{"line_number":1556,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":1557,"context_line":"            return l3_obj.FloatingIP.update_object("},{"line_number":1558,"context_line":"                context, {\u0027status\u0027: status}, id\u003dfloatingip_id)"},{"line_number":1559,"context_line":""},{"line_number":1560,"context_line":"    @registry.receives(resources.PORT, [events.PRECOMMIT_DELETE])"},{"line_number":1561,"context_line":"    def _precommit_delete_port_callback("}],"source_content_type":"text/x-python","patch_set":4,"id":"2365457b_c50d396e","line":1558,"range":{"start_line":1556,"start_character":1,"end_line":1558,"end_character":62},"in_reply_to":"5f27a498_542ec935","updated":"2022-07-08 08:24:36.000000000","message":"You are right, I moved this CONTEXT_WRITER to update_floatingip_status_retry","commit_id":"65bb30ddf8c11fe8896b914ff88f8a7afd5cf64d"}],"neutron/services/ovn_l3/plugin.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"ed33c5bfe15ae816305312c7cae5593d08e71f6b","unresolved":true,"context_lines":[{"line_number":295,"context_line":"        return fip"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":298,"context_line":"    def update_floatingip_status_retry(self, context, floatingip_id, status):"},{"line_number":299,"context_line":"        return super(OVNL3RouterPlugin, self).update_floatingip_status("},{"line_number":300,"context_line":"            context, floatingip_id, status)"},{"line_number":301,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"66286fc1_2576867a","line":298,"range":{"start_line":298,"start_character":8,"end_line":298,"end_character":38},"updated":"2022-07-06 15:03:15.000000000","message":"+1, this is what I was talking about","commit_id":"65bb30ddf8c11fe8896b914ff88f8a7afd5cf64d"}]}
