)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"fadda5c6ad00ee145b752d5d995a75fc49e88bc8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"95968752_9461768b","updated":"2025-12-19 15:00:17.000000000","message":"Comment in PS1","commit_id":"2ffe69c87c348d637b4cb86567989216678d8897"}],"neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_db_sync.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"7df1ecc283063b3d509065a42d1ea59c7c1bb9be","unresolved":true,"context_lines":[{"line_number":1546,"context_line":"                  str(datetime.now()))"},{"line_number":1547,"context_line":"        host_phynets_map \u003d self.ovn_sb_api.get_chassis_hostname_and_physnets()"},{"line_number":1548,"context_line":"        current_hosts \u003d set(host_phynets_map)"},{"line_number":1549,"context_line":"        previous_hosts \u003d segments_db.get_hosts_mapped_with_segments("},{"line_number":1550,"context_line":"            ctx, include_agent_types\u003dset(ovn_const.OVN_CONTROLLER_TYPES))"},{"line_number":1551,"context_line":""},{"line_number":1552,"context_line":"        stale_hosts \u003d previous_hosts - current_hosts"}],"source_content_type":"text/x-python","patch_set":1,"id":"ffbb30b7_58cdc59a","line":1549,"updated":"2025-12-19 12:14:55.000000000","message":"In the mech_driver class `OVNMechanismDriver` we have some methods (`patch_plugin_choose`, `patch_plugin_choose`) used to override some base methods. This should be something to be applied here. The method `get_hosts_mapped_with_segments` must be replaced with a specific implementation only for OVN.\n\nIn any case, and checking the usage of `get_hosts_mapped_with_segments`, this method is only used for the OVN DB sync tool. I would modify the method itself, making the filter using a loop instead of using a sql join.","commit_id":"7298eea671c49f7f6fea89aa3a2d83cdfea02433"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"0000bc7d4a931f4cb0dea23a987a0dc62c971fe5","unresolved":true,"context_lines":[{"line_number":1546,"context_line":"                  str(datetime.now()))"},{"line_number":1547,"context_line":"        host_phynets_map \u003d self.ovn_sb_api.get_chassis_hostname_and_physnets()"},{"line_number":1548,"context_line":"        current_hosts \u003d set(host_phynets_map)"},{"line_number":1549,"context_line":"        previous_hosts \u003d segments_db.get_hosts_mapped_with_segments("},{"line_number":1550,"context_line":"            ctx, include_agent_types\u003dset(ovn_const.OVN_CONTROLLER_TYPES))"},{"line_number":1551,"context_line":""},{"line_number":1552,"context_line":"        stale_hosts \u003d previous_hosts - current_hosts"}],"source_content_type":"text/x-python","patch_set":1,"id":"7def8854_50d8328a","line":1549,"in_reply_to":"4986c078_53c4130b","updated":"2025-12-24 10:09:40.000000000","message":"So my point is that this code (`sync_hostname_and_physical_networks` method), should be kept unchanged. Instead you should change `get_hosts_mapped_with_segments`. Basically, the change in `get_hosts_mapped_with_segments` [1] was done to be used in the DB sync tool [2]. But as you have shown, the OVN agents are not stored in the Neutron DB, thus the filter done in [1] won\u0027t handle the OVN agents.\n\nThe suggestion is to change `get_hosts_mapped_with_segments` (revert the previous code) and implement a \"manual\" filter --\u003e once you have retrieved all segments, filter by agent (not via SQL but using Python code).\n\n[1]https://review.opendev.org/c/openstack/neutron/+/899130\n[2]https://review.opendev.org/c/openstack/neutron/+/899077","commit_id":"7298eea671c49f7f6fea89aa3a2d83cdfea02433"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"ec411e85e27dfe47665ea7cc7002907654db85e5","unresolved":true,"context_lines":[{"line_number":1546,"context_line":"                  str(datetime.now()))"},{"line_number":1547,"context_line":"        host_phynets_map \u003d self.ovn_sb_api.get_chassis_hostname_and_physnets()"},{"line_number":1548,"context_line":"        current_hosts \u003d set(host_phynets_map)"},{"line_number":1549,"context_line":"        previous_hosts \u003d segments_db.get_hosts_mapped_with_segments("},{"line_number":1550,"context_line":"            ctx, include_agent_types\u003dset(ovn_const.OVN_CONTROLLER_TYPES))"},{"line_number":1551,"context_line":""},{"line_number":1552,"context_line":"        stale_hosts \u003d previous_hosts - current_hosts"}],"source_content_type":"text/x-python","patch_set":1,"id":"c8f06b7b_bbd1b9d2","line":1549,"in_reply_to":"7def8854_50d8328a","updated":"2026-01-14 11:59:57.000000000","message":"I\u0027ve proposed https://review.opendev.org/c/openstack/neutron/+/973366","commit_id":"7298eea671c49f7f6fea89aa3a2d83cdfea02433"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"0a59f06e8b6a32d1d88e8f8a43c8920cc769871c","unresolved":true,"context_lines":[{"line_number":1546,"context_line":"                  str(datetime.now()))"},{"line_number":1547,"context_line":"        host_phynets_map \u003d self.ovn_sb_api.get_chassis_hostname_and_physnets()"},{"line_number":1548,"context_line":"        current_hosts \u003d set(host_phynets_map)"},{"line_number":1549,"context_line":"        previous_hosts \u003d segments_db.get_hosts_mapped_with_segments("},{"line_number":1550,"context_line":"            ctx, include_agent_types\u003dset(ovn_const.OVN_CONTROLLER_TYPES))"},{"line_number":1551,"context_line":""},{"line_number":1552,"context_line":"        stale_hosts \u003d previous_hosts - current_hosts"}],"source_content_type":"text/x-python","patch_set":1,"id":"968827c7_7b3cc86a","line":1549,"in_reply_to":"c8f06b7b_bbd1b9d2","updated":"2026-04-07 08:50:23.000000000","message":"Thanks a lot for working on this!","commit_id":"7298eea671c49f7f6fea89aa3a2d83cdfea02433"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"34070c30517ac16c8e885d0b88073cec952ee2ec","unresolved":true,"context_lines":[{"line_number":1546,"context_line":"                  str(datetime.now()))"},{"line_number":1547,"context_line":"        host_phynets_map \u003d self.ovn_sb_api.get_chassis_hostname_and_physnets()"},{"line_number":1548,"context_line":"        current_hosts \u003d set(host_phynets_map)"},{"line_number":1549,"context_line":"        previous_hosts \u003d segments_db.get_hosts_mapped_with_segments("},{"line_number":1550,"context_line":"            ctx, include_agent_types\u003dset(ovn_const.OVN_CONTROLLER_TYPES))"},{"line_number":1551,"context_line":""},{"line_number":1552,"context_line":"        stale_hosts \u003d previous_hosts - current_hosts"}],"source_content_type":"text/x-python","patch_set":1,"id":"4986c078_53c4130b","line":1549,"in_reply_to":"ffbb30b7_58cdc59a","updated":"2025-12-19 15:21:34.000000000","message":"Um. I\u0027m frankly not sure in own competence to patch this properly, as quite new to OVN overall.\n\nI can really abandon this patch, if you have a better idea on how to do that, and have some capacity to implement it...","commit_id":"7298eea671c49f7f6fea89aa3a2d83cdfea02433"}]}
