)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"3742cc059d7305ffe9a175b38526747c34e3686b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"e6734456_510e2770","updated":"2025-03-07 13:47:29.000000000","message":"recheck neutron-functional","commit_id":"5e852de18bf914a32cc42b7200baa9d5503424bd"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"9c9074c019be3dea3ceaf9e1d318d5e562560ba7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"6805dce8_994ecc3c","updated":"2025-03-18 15:01:23.000000000","message":"This still seems WIP based on code","commit_id":"f6a960fd46172cc6cd5bd49a5fbff2babddf06e3"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"af5f48f4668d13d2628501219d8c2caeb1a578bd","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"f51c76e8_50a47e4a","in_reply_to":"6805dce8_994ecc3c","updated":"2025-03-18 15:28:51.000000000","message":"Not really, I just forgot to delete some unnecessary sections. I\u0027ll push a new PS now.","commit_id":"f6a960fd46172cc6cd5bd49a5fbff2babddf06e3"},{"author":{"_account_id":34118,"name":"Arnau Verdaguer","email":"averdagu@redhat.com","username":"averdaguer"},"change_message_id":"00829498b8451ac491e9d51f15939adb97f8e772","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"d7a46239_cd367185","updated":"2025-03-20 10:03:42.000000000","message":"LGTM, just a small suggestion, see comment","commit_id":"af1dec65fd4d55fc7fcc0449e01a413ea45c6882"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"391bd6c744e813a9c126de2e7d404bb6024ac44b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"06b30454_09c65bc8","updated":"2025-03-19 14:38:49.000000000","message":"recheck openstack-tox-cover","commit_id":"af1dec65fd4d55fc7fcc0449e01a413ea45c6882"},{"author":{"_account_id":34118,"name":"Arnau Verdaguer","email":"averdagu@redhat.com","username":"averdaguer"},"change_message_id":"a8c88193f2abf86bff2325b27cf8fd864c421e3c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"369d96d5_57a4230e","updated":"2025-03-20 11:07:57.000000000","message":"LGTM, thanks","commit_id":"190f72d98597f573a169329cb93a14ce49d8e917"},{"author":{"_account_id":21798,"name":"Bernard Cafarelli","email":"bcafarel@redhat.com","username":"bcafarel"},"change_message_id":"0a394512050937ddb9f8e5eba048e2a13a8de676","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"cc5bd402_482fabfd","updated":"2025-03-20 11:06:46.000000000","message":"LGTM, unrelated functional failure in last run","commit_id":"190f72d98597f573a169329cb93a14ce49d8e917"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"108df55231d11d203031187f9d1361f5b265dd6a","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":10,"id":"67ef1e4b_4b9cb2c4","updated":"2025-03-20 15:27:47.000000000","message":"My only real concern is that the fix and the optimization should be different patches. Given that the `CreateEvent` already called `set_port_status_up()` for every port at startup where the row was up/enabled and we didn\u0027t have known issues with that and this just adds hitting it a bit more sporadically, the optimization shouldn\u0027t be required for the fix. And if we do find issues with the optimization (syncing things is hard/messy and unexpected edge cases happen) and need to revert, we wouldn\u0027t want to lose the actual fix.","commit_id":"190f72d98597f573a169329cb93a14ce49d8e917"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"db63a565d4a7f288600f68c622df26397b49d692","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"21f3365d_da8c24f9","updated":"2025-03-20 13:49:11.000000000","message":"recheck neutron-functional","commit_id":"190f72d98597f573a169329cb93a14ce49d8e917"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"2e9fa08c468ed9eb4c6ea68054b6a9abf114633b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"d9ece9b5_b776bee5","in_reply_to":"67ef1e4b_4b9cb2c4","updated":"2025-03-21 07:27:19.000000000","message":"Agree. It is more important first to fix the disconnection issues during the port binding; then, in future patches, we can implement (and test) the optimization of the port_up/down calls.","commit_id":"190f72d98597f573a169329cb93a14ce49d8e917"},{"author":{"_account_id":34118,"name":"Arnau Verdaguer","email":"averdagu@redhat.com","username":"averdaguer"},"change_message_id":"9a2fc608bec4e5f36649f2739e0d9487b2e5833d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"d419348c_26100797","updated":"2025-03-21 11:23:39.000000000","message":"LGTM, agree on keeping fix on a different patch than the possible optimization. Thanks for suggesting this Terry","commit_id":"d762a61fbf8458fab42fb1271860c5331b181427"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"0947464dee6f98035873b180bb156a8e57fca9a3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"ee63b063_04d3a67d","updated":"2025-03-22 21:38:17.000000000","message":"Looks good. Some nitty small improvements that could be made. But none are strictly necessary (though the commented out code should probably be removed).\n\nThinking about things, in a raft cluster, the only way we should miss the update event would be if we are delayed enough coming back up that a bunch of things have happened while we are reconnecting. Normally, when we reconnect we\u0027d actually just get the UPDATE transaction that we\u0027d missed. In a non-RAFT situation, we\u0027d always get the full download and therefor CREATE events. We need to handle both all cases, so it\u0027s good to have the patch. Just in the RAFT situation, despite reconnects being more common, it should be really uncommon except on really busy systems to have to do the full DB dump.","commit_id":"d762a61fbf8458fab42fb1271860c5331b181427"},{"author":{"_account_id":34118,"name":"Arnau Verdaguer","email":"averdagu@redhat.com","username":"averdaguer"},"change_message_id":"364a10be2477d3e5b7e25474cde0bd792ecb7381","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"60cacb37_b2761136","updated":"2025-03-21 13:39:02.000000000","message":"recheck neutron-functional","commit_id":"d762a61fbf8458fab42fb1271860c5331b181427"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"198c4a8e2c4bfce9173693ae2a53390eb58b027f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"26f8960e_fb3e0722","updated":"2025-03-21 15:15:56.000000000","message":"recheck test_floatingip_mac_bindings","commit_id":"d762a61fbf8458fab42fb1271860c5331b181427"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"860a256189b7e634660f36f86a50aa336fff59a0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":14,"id":"bf0cc28e_7560e6af","updated":"2025-03-24 13:44:52.000000000","message":"Looks good!","commit_id":"1c953a0bcc0ddce0580055b89e006589bc92ff4a"}],"neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovsdb_monitor.py":[{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"130cd8e8f1529ed35422d1fc98615f79a7fc5f6d","unresolved":true,"context_lines":[{"line_number":489,"context_line":"    def __init__(self, driver):"},{"line_number":490,"context_line":"        self.driver \u003d driver"},{"line_number":491,"context_line":"        table \u003d \u0027Logical_Switch_Port\u0027"},{"line_number":492,"context_line":"        events \u003d (self.ROW_UPDATE, self.ROW_CREATE)"},{"line_number":493,"context_line":"        super().__init__("},{"line_number":494,"context_line":"            events, table, None)"},{"line_number":495,"context_line":"        self.event_name \u003d \u0027LogicalSwitchPortUpdateUpEvent\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"794f3ef9_d0b2d281","line":492,"updated":"2025-03-10 22:55:01.000000000","message":"Right above this event, we already have a LogicalSwitchPortCreateEvent which looks like it will set status up/down for every port when it shows up already, regardless of what we do in this event and this event registered on the same connections as LogicalSwitchPortUpdateUpEvent.\n\nSomething disturbing I\u0027m seeing on my devstack environment is that if I restart ovn-ovsdb-server-nb, while I see reconnections in the MaintenanceWorker process, the uwsgi workers do absolutely nothing unless an API request is made (even a network list will wake it up and then the reconnections happen). lsof shows the connections to ovsb-server in CLOSE_WAIT status. This is with ovsdb_connection_timeout\u003d10 and ovsdb_probe_interval\u003d10000 (and even with TCPSTream/SSLStream overrides in commented out). strace just shows it sitting in a futex call. I haven\u0027t tracked down exactly what is happening yet.","commit_id":"5e852de18bf914a32cc42b7200baa9d5503424bd"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"8bbfba32519050b1c4ecc0a462676df2b1d595fe","unresolved":true,"context_lines":[{"line_number":489,"context_line":"    def __init__(self, driver):"},{"line_number":490,"context_line":"        self.driver \u003d driver"},{"line_number":491,"context_line":"        table \u003d \u0027Logical_Switch_Port\u0027"},{"line_number":492,"context_line":"        events \u003d (self.ROW_UPDATE, self.ROW_CREATE)"},{"line_number":493,"context_line":"        super().__init__("},{"line_number":494,"context_line":"            events, table, None)"},{"line_number":495,"context_line":"        self.event_name \u003d \u0027LogicalSwitchPortUpdateUpEvent\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"94e384a3_60419ffa","line":492,"in_reply_to":"794f3ef9_d0b2d281","updated":"2025-03-11 13:11:51.000000000","message":"Ignore the blocking issue comments above, my devstack environment still had \u0027logger\u0027 loaded.\n\nWith that fixed, I see the events for `handling event \"create\" for row f9e01742-6b58-4d10-bc88-0d5741844457 (table: Logical_Switch_Port)` when restarting ovsdb-server, but I don\u0027t see the LogicalSwitchPortCreateEvent fire. I do see those fire when restarting neutron-api, though. And I just noticed we specifically unwatch those events at post_connect.\n\nSo should we just not unwatch them and do your check there?","commit_id":"5e852de18bf914a32cc42b7200baa9d5503424bd"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"aa3f814475527c267d0c6288cf5fceeb546baf53","unresolved":false,"context_lines":[{"line_number":489,"context_line":"    def __init__(self, driver):"},{"line_number":490,"context_line":"        self.driver \u003d driver"},{"line_number":491,"context_line":"        table \u003d \u0027Logical_Switch_Port\u0027"},{"line_number":492,"context_line":"        events \u003d (self.ROW_UPDATE, self.ROW_CREATE)"},{"line_number":493,"context_line":"        super().__init__("},{"line_number":494,"context_line":"            events, table, None)"},{"line_number":495,"context_line":"        self.event_name \u003d \u0027LogicalSwitchPortUpdateUpEvent\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"82fdc3bd_f2e1f710","line":492,"in_reply_to":"94e384a3_60419ffa","updated":"2025-03-12 12:09:28.000000000","message":"Agree with this. We have 2 separate events, one for create and this one for update. I can move this check to the upper one (create) and remove the unwatch call. Let me push a new PS.","commit_id":"5e852de18bf914a32cc42b7200baa9d5503424bd"},{"author":{"_account_id":34118,"name":"Arnau Verdaguer","email":"averdagu@redhat.com","username":"averdaguer"},"change_message_id":"00829498b8451ac491e9d51f15939adb97f8e772","unresolved":true,"context_lines":[{"line_number":476,"context_line":""},{"line_number":477,"context_line":"    def run(self, event, row, old):"},{"line_number":478,"context_line":"        is_up \u003d row.external_ids.get(ovn_const.OVN_PORT_IS_UP)"},{"line_number":479,"context_line":"        is_up \u003d strutils.bool_from_string(is_up) if is_up else False"},{"line_number":480,"context_line":"        if utils.is_lsp_up(row) and utils.is_lsp_enabled(row):"},{"line_number":481,"context_line":"            if not is_up:"},{"line_number":482,"context_line":"                self.driver.set_port_status_up(row.name)"}],"source_content_type":"text/x-python","patch_set":9,"id":"5ec304f4_5fe720d2","line":479,"range":{"start_line":479,"start_character":8,"end_line":479,"end_character":14},"updated":"2025-03-20 10:03:42.000000000","message":"This code is clear within the context of this commit, but if investigated later this could maybe cause confusion, could it be good to add a small commit explaining why the is_up is needed to make this code better to understand in the future?","commit_id":"af1dec65fd4d55fc7fcc0449e01a413ea45c6882"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"6fb230a6657894e496c7994224727a5489289945","unresolved":false,"context_lines":[{"line_number":476,"context_line":""},{"line_number":477,"context_line":"    def run(self, event, row, old):"},{"line_number":478,"context_line":"        is_up \u003d row.external_ids.get(ovn_const.OVN_PORT_IS_UP)"},{"line_number":479,"context_line":"        is_up \u003d strutils.bool_from_string(is_up) if is_up else False"},{"line_number":480,"context_line":"        if utils.is_lsp_up(row) and utils.is_lsp_enabled(row):"},{"line_number":481,"context_line":"            if not is_up:"},{"line_number":482,"context_line":"                self.driver.set_port_status_up(row.name)"}],"source_content_type":"text/x-python","patch_set":9,"id":"fbbab153_f77909bf","line":479,"range":{"start_line":479,"start_character":8,"end_line":479,"end_character":14},"in_reply_to":"5ec304f4_5fe720d2","updated":"2025-03-20 10:05:43.000000000","message":"For sure, that deserves a small explanation.","commit_id":"af1dec65fd4d55fc7fcc0449e01a413ea45c6882"}],"neutron/tests/functional/plugins/ml2/drivers/ovn/mech_driver/test_mech_driver.py":[{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"108df55231d11d203031187f9d1361f5b265dd6a","unresolved":true,"context_lines":[{"line_number":358,"context_line":"            mock_get_port.return_value \u003d mock.Mock("},{"line_number":359,"context_line":"                port_bindings\u003d[mock.Mock(host\u003d\u0027host1\u0027)],"},{"line_number":360,"context_line":"                id\u003dlsp_name, device_owner\u003d\u0027router\u0027)"},{"line_number":361,"context_line":"            self.restart(delete_dbs\u003dNone)"},{"line_number":362,"context_line":""},{"line_number":363,"context_line":"        try:"},{"line_number":364,"context_line":"            # The IDL is restarted and the event should be received."}],"source_content_type":"text/x-python","patch_set":10,"id":"78c47ed9_f6e04716","line":361,"range":{"start_line":361,"start_character":36,"end_line":361,"end_character":40},"updated":"2025-03-20 15:27:47.000000000","message":"super unimportant nit: False","commit_id":"190f72d98597f573a169329cb93a14ce49d8e917"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"2e9fa08c468ed9eb4c6ea68054b6a9abf114633b","unresolved":false,"context_lines":[{"line_number":358,"context_line":"            mock_get_port.return_value \u003d mock.Mock("},{"line_number":359,"context_line":"                port_bindings\u003d[mock.Mock(host\u003d\u0027host1\u0027)],"},{"line_number":360,"context_line":"                id\u003dlsp_name, device_owner\u003d\u0027router\u0027)"},{"line_number":361,"context_line":"            self.restart(delete_dbs\u003dNone)"},{"line_number":362,"context_line":""},{"line_number":363,"context_line":"        try:"},{"line_number":364,"context_line":"            # The IDL is restarted and the event should be received."}],"source_content_type":"text/x-python","patch_set":10,"id":"8eb90cc9_b3c85256","line":361,"range":{"start_line":361,"start_character":36,"end_line":361,"end_character":40},"in_reply_to":"78c47ed9_f6e04716","updated":"2025-03-21 07:27:19.000000000","message":"Done","commit_id":"190f72d98597f573a169329cb93a14ce49d8e917"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"0947464dee6f98035873b180bb156a8e57fca9a3","unresolved":true,"context_lines":[{"line_number":330,"context_line":"        # # This patch checks that if a LSP.up event is missed (due to a"},{"line_number":331,"context_line":"        # # disconnection, for example), once the IDL is restored, the"},{"line_number":332,"context_line":"        # # LSP.up event will be received as a CREATE event."},{"line_number":333,"context_line":"        # def check_port_is_up(lsp_name):"},{"line_number":334,"context_line":"        #     lsp \u003d self.nb_api.lsp_get(lsp_name).execute(check_error\u003dTrue)"},{"line_number":335,"context_line":"        #     return strutils.bool_from_string("},{"line_number":336,"context_line":"        #         lsp.external_ids.get(ovn_const.OVN_PORT_IS_UP),"},{"line_number":337,"context_line":"        #         default\u003dFalse)"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"        def _check_set_up_called(_mock, lsp_name):"},{"line_number":340,"context_line":"            n_utils.wait_until_true(lambda: _mock.call_count \u003d\u003d 1, timeout\u003d10)"}],"source_content_type":"text/x-python","patch_set":13,"id":"a9827b28_aabdcf48","line":337,"range":{"start_line":333,"start_character":0,"end_line":337,"end_character":32},"updated":"2025-03-22 21:38:17.000000000","message":"Does this commented-out method need to be removed?","commit_id":"d762a61fbf8458fab42fb1271860c5331b181427"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"697dabd35c9edccdd89d91f77ad0b477bc08bac7","unresolved":false,"context_lines":[{"line_number":330,"context_line":"        # # This patch checks that if a LSP.up event is missed (due to a"},{"line_number":331,"context_line":"        # # disconnection, for example), once the IDL is restored, the"},{"line_number":332,"context_line":"        # # LSP.up event will be received as a CREATE event."},{"line_number":333,"context_line":"        # def check_port_is_up(lsp_name):"},{"line_number":334,"context_line":"        #     lsp \u003d self.nb_api.lsp_get(lsp_name).execute(check_error\u003dTrue)"},{"line_number":335,"context_line":"        #     return strutils.bool_from_string("},{"line_number":336,"context_line":"        #         lsp.external_ids.get(ovn_const.OVN_PORT_IS_UP),"},{"line_number":337,"context_line":"        #         default\u003dFalse)"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"        def _check_set_up_called(_mock, lsp_name):"},{"line_number":340,"context_line":"            n_utils.wait_until_true(lambda: _mock.call_count \u003d\u003d 1, timeout\u003d10)"}],"source_content_type":"text/x-python","patch_set":13,"id":"8ebdee31_ebd669c7","line":337,"range":{"start_line":333,"start_character":0,"end_line":337,"end_character":32},"in_reply_to":"a9827b28_aabdcf48","updated":"2025-03-24 07:46:17.000000000","message":"Yes, this is a leftover","commit_id":"d762a61fbf8458fab42fb1271860c5331b181427"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"0947464dee6f98035873b180bb156a8e57fca9a3","unresolved":true,"context_lines":[{"line_number":354,"context_line":""},{"line_number":355,"context_line":"            # Restart the OVS database that forces the IDL reconnection."},{"line_number":356,"context_line":"            # Reset the ``mock_set_up`` that needs to be called again."},{"line_number":357,"context_line":"            with mock.patch.object(self.mech_driver, \u0027_init_hash_ring\u0027), \\"},{"line_number":358,"context_line":"                    mock.patch.object(ml2_db, \u0027get_port\u0027) as mock_get_port:"},{"line_number":359,"context_line":"                mock_get_port.return_value \u003d mock.Mock("},{"line_number":360,"context_line":"                    port_bindings\u003d[mock.Mock(host\u003d\u0027host1\u0027)],"},{"line_number":361,"context_line":"                    id\u003dlsp_name, device_owner\u003d\u0027router\u0027)"},{"line_number":362,"context_line":"                mock_set_up.reset_mock()"},{"line_number":363,"context_line":"                self.restart(delete_dbs\u003dFalse)"},{"line_number":364,"context_line":""},{"line_number":365,"context_line":"            # Check that ``set_port_status_up`` has been called when the IDL"},{"line_number":366,"context_line":"            # reconnects."}],"source_content_type":"text/x-python","patch_set":13,"id":"5e87b307_e8768d8a","line":363,"range":{"start_line":357,"start_character":0,"end_line":363,"end_character":46},"updated":"2025-03-22 21:38:17.000000000","message":"I checked python-ovs, and it turns out you can force the IDL to reconnect w/o restarting the server. This block can be replaced with:\n\n```\nself.nb_api.idl.force_reconnect()\ndlutils.wait_for_change(self.nb_api.dil, timeout\u003d10)\n```\n\nwhich would also remove the need for the `delete_dbs` stuff. The `wait_for_change()` call is due to an issue with ovsdbapp where if we are in a blocking call, it can take a while for us to process the reconnect. I have a patch in progress to add a Connection.force_reconnect() that wakes up the poller when we force a reconnect client-side.","commit_id":"d762a61fbf8458fab42fb1271860c5331b181427"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"860a256189b7e634660f36f86a50aa336fff59a0","unresolved":false,"context_lines":[{"line_number":354,"context_line":""},{"line_number":355,"context_line":"            # Restart the OVS database that forces the IDL reconnection."},{"line_number":356,"context_line":"            # Reset the ``mock_set_up`` that needs to be called again."},{"line_number":357,"context_line":"            with mock.patch.object(self.mech_driver, \u0027_init_hash_ring\u0027), \\"},{"line_number":358,"context_line":"                    mock.patch.object(ml2_db, \u0027get_port\u0027) as mock_get_port:"},{"line_number":359,"context_line":"                mock_get_port.return_value \u003d mock.Mock("},{"line_number":360,"context_line":"                    port_bindings\u003d[mock.Mock(host\u003d\u0027host1\u0027)],"},{"line_number":361,"context_line":"                    id\u003dlsp_name, device_owner\u003d\u0027router\u0027)"},{"line_number":362,"context_line":"                mock_set_up.reset_mock()"},{"line_number":363,"context_line":"                self.restart(delete_dbs\u003dFalse)"},{"line_number":364,"context_line":""},{"line_number":365,"context_line":"            # Check that ``set_port_status_up`` has been called when the IDL"},{"line_number":366,"context_line":"            # reconnects."}],"source_content_type":"text/x-python","patch_set":13,"id":"de54538b_1c6896aa","line":363,"range":{"start_line":357,"start_character":0,"end_line":363,"end_character":46},"in_reply_to":"2609c21f_1feb4777","updated":"2025-03-24 13:44:52.000000000","message":"Weird, worked for me. I\u0027ll post the patch that does real force_reconnect() handling in ovsdbapp. Obviously not necessary for this patch. Thanks for the info!","commit_id":"d762a61fbf8458fab42fb1271860c5331b181427"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"697dabd35c9edccdd89d91f77ad0b477bc08bac7","unresolved":false,"context_lines":[{"line_number":354,"context_line":""},{"line_number":355,"context_line":"            # Restart the OVS database that forces the IDL reconnection."},{"line_number":356,"context_line":"            # Reset the ``mock_set_up`` that needs to be called again."},{"line_number":357,"context_line":"            with mock.patch.object(self.mech_driver, \u0027_init_hash_ring\u0027), \\"},{"line_number":358,"context_line":"                    mock.patch.object(ml2_db, \u0027get_port\u0027) as mock_get_port:"},{"line_number":359,"context_line":"                mock_get_port.return_value \u003d mock.Mock("},{"line_number":360,"context_line":"                    port_bindings\u003d[mock.Mock(host\u003d\u0027host1\u0027)],"},{"line_number":361,"context_line":"                    id\u003dlsp_name, device_owner\u003d\u0027router\u0027)"},{"line_number":362,"context_line":"                mock_set_up.reset_mock()"},{"line_number":363,"context_line":"                self.restart(delete_dbs\u003dFalse)"},{"line_number":364,"context_line":""},{"line_number":365,"context_line":"            # Check that ``set_port_status_up`` has been called when the IDL"},{"line_number":366,"context_line":"            # reconnects."}],"source_content_type":"text/x-python","patch_set":13,"id":"2609c21f_1feb4777","line":363,"range":{"start_line":357,"start_character":0,"end_line":363,"end_character":46},"in_reply_to":"5e87b307_e8768d8a","updated":"2025-03-24 07:46:17.000000000","message":"This is not working for me. The ``wait_for_change`` got stuck in ``poller.block()`` forever and never returns.","commit_id":"d762a61fbf8458fab42fb1271860c5331b181427"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"0947464dee6f98035873b180bb156a8e57fca9a3","unresolved":true,"context_lines":[{"line_number":364,"context_line":""},{"line_number":365,"context_line":"            # Check that ``set_port_status_up`` has been called when the IDL"},{"line_number":366,"context_line":"            # reconnects."},{"line_number":367,"context_line":"            _check_set_up_called(mock_set_up, lsp_name)"},{"line_number":368,"context_line":""},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"class TestPortBindingOverTcp(TestPortBinding):"}],"source_content_type":"text/x-python","patch_set":13,"id":"546a77fc_0ebcd38e","line":367,"updated":"2025-03-22 21:38:17.000000000","message":"Feel free to ignore this one. It led me down a rabbit hole, so I\u0027m posting it. :p If we\u0027re planning on potentially optimizing this, then we\u0027ll have to change the test with that patch since we\u0027re checking that set_up is called. If we are only concerned with testing that the Event matches, we could use a WaitEvent for the second check.\n\ne.g.\n```\nclass LspCreateWaitEvent(event.WaitEvent):\n    ONETIME \u003d True\n    event_name \u003d \"LspCreateWaitEvent\"\n\n    def __init__(self, lsp_name, timeout):\n        super().__init__((self.ROW_CREATE,), \u0027Logical_Switch_Port\u0027,\n                         ((\"name\", \"\u003d\", lsp_name),), timeout\u003dtimeout)\n\n...\nevent \u003d LspCreateWaitEvent(lsp.name, timeout\u003d10)\nself.nb_api.idl.notify_handler.watch_event(event)\nself.nb_api.idl.force_reconnect()\nidlutils.wait_for_change(self.nb_api.dil, timeout\u003d10)\nself.assertTrue(event.wait())\n```\nAnnoyingly, it\u0027s kind of hard to use the WaitEvent for the first check because you need to watch for the event before you trigger it, and the event is triggered by router creation, and we need the uuid of the neutorn router to know the name of the Logical_Router to watch for the event. We could probably make the event watch for addresses \u003d [router] and external_ids:neutron:device_owner\u003dnetwork:router_gateway and split out creation of the network and match neutron:network_name, but that\u0027s all a lot just to remove a `wait_until_true()` call.","commit_id":"d762a61fbf8458fab42fb1271860c5331b181427"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"860a256189b7e634660f36f86a50aa336fff59a0","unresolved":false,"context_lines":[{"line_number":364,"context_line":""},{"line_number":365,"context_line":"            # Check that ``set_port_status_up`` has been called when the IDL"},{"line_number":366,"context_line":"            # reconnects."},{"line_number":367,"context_line":"            _check_set_up_called(mock_set_up, lsp_name)"},{"line_number":368,"context_line":""},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"class TestPortBindingOverTcp(TestPortBinding):"}],"source_content_type":"text/x-python","patch_set":13,"id":"2098bdae_cabbd8c7","line":367,"in_reply_to":"11d91b84_b6e5cb15","updated":"2025-03-24 13:44:52.000000000","message":"Yeah, I was just thinking about the optimization you were thinking about later where most of the calls would disappear. Still would need it for this case though. Carry on. 😄","commit_id":"d762a61fbf8458fab42fb1271860c5331b181427"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"697dabd35c9edccdd89d91f77ad0b477bc08bac7","unresolved":false,"context_lines":[{"line_number":364,"context_line":""},{"line_number":365,"context_line":"            # Check that ``set_port_status_up`` has been called when the IDL"},{"line_number":366,"context_line":"            # reconnects."},{"line_number":367,"context_line":"            _check_set_up_called(mock_set_up, lsp_name)"},{"line_number":368,"context_line":""},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"class TestPortBindingOverTcp(TestPortBinding):"}],"source_content_type":"text/x-python","patch_set":13,"id":"11d91b84_b6e5cb15","line":367,"in_reply_to":"546a77fc_0ebcd38e","updated":"2025-03-24 07:46:17.000000000","message":"I\u0027m indirectly checking the event is received testing ``set_port_status_up`` is called when the ``LogicalSwitchPortCreateEvent`` event is called. Actually the method ``set_port_status_up`` is what Neutron needs to call in this case, to bind the port and send the Nova event (that is the issue described in the bug).","commit_id":"d762a61fbf8458fab42fb1271860c5331b181427"}],"neutron/tests/unit/plugins/ml2/drivers/ovn/mech_driver/ovsdb/test_ovsdb_monitor.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"b32c23a5fe2eb47d78d80304fadb2ba188ab1c3a","unresolved":true,"context_lines":[{"line_number":62,"context_line":"                                           \"max\": \"unlimited\"}},"},{"line_number":63,"context_line":"                \"up\": {\"type\": {\"key\": \"boolean\", \"min\": 0, \"max\": 1}},"},{"line_number":64,"context_line":"                \"enabled\": {\"type\": {\"key\": \"boolean\", \"min\": 0, \"max\": 1}},"},{"line_number":65,"context_line":"                \"external_ids\": {"},{"line_number":66,"context_line":"                    \"type\": {\"key\": \"string\", \"value\": \"string\","},{"line_number":67,"context_line":"                             \"min\": 0, \"max\": \"unlimited\"}},"},{"line_number":68,"context_line":"            },"},{"line_number":69,"context_line":"            \"indexes\": [[\"name\"]],"},{"line_number":70,"context_line":"            \"isRoot\": False,"}],"source_content_type":"text/x-python","patch_set":14,"id":"8d878540_a470cce1","line":67,"range":{"start_line":65,"start_character":16,"end_line":67,"end_character":60},"updated":"2025-03-25 11:38:46.000000000","message":"NOTE: this is a leftover of a previous implementation, when using the LSP.external_ids:is_up flag. This doesn\u0027t break anything in the UTs","commit_id":"1c953a0bcc0ddce0580055b89e006589bc92ff4a"}]}
