)]}'
{"neutron/cmd/usage_audit.py":[{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"3178269257dfd6f0810e26778e20bfff11cb46ec","unresolved":true,"context_lines":[{"line_number":54,"context_line":"                try:"},{"line_number":55,"context_line":"                    # Create OVSDB(NB) connection directly using"},{"line_number":56,"context_line":"                    # from_worker() and assign the connection to the driver"},{"line_number":57,"context_line":"                    mech_driver.obj.nb_ovn \u003d ("},{"line_number":58,"context_line":"                        impl_idl_ovn.OvsdbNbOvnIdl.from_worker("},{"line_number":59,"context_line":"                            worker.MaintenanceWorker))"},{"line_number":60,"context_line":"                    mech_driver.obj._post_fork_event.set()"}],"source_content_type":"text/x-python","patch_set":1,"id":"03492e37_1ebb1f7c","line":57,"range":{"start_line":57,"start_character":36,"end_line":57,"end_character":42},"updated":"2026-07-28 07:31:06.000000000","message":"for auditing you only need to use the nb_db, or you need also sb_db? if yes you have to initialize that as well.","commit_id":"c9cff22d60e85342f1002e41638bffce8c29f4af"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"3178269257dfd6f0810e26778e20bfff11cb46ec","unresolved":true,"context_lines":[{"line_number":55,"context_line":"                    # Create OVSDB(NB) connection directly using"},{"line_number":56,"context_line":"                    # from_worker() and assign the connection to the driver"},{"line_number":57,"context_line":"                    mech_driver.obj.nb_ovn \u003d ("},{"line_number":58,"context_line":"                        impl_idl_ovn.OvsdbNbOvnIdl.from_worker("},{"line_number":59,"context_line":"                            worker.MaintenanceWorker))"},{"line_number":60,"context_line":"                    mech_driver.obj._post_fork_event.set()"},{"line_number":61,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"13173e5d_630a447e","line":58,"updated":"2026-07-28 07:31:06.000000000","message":"don\u0027t you need a retry here, like for the get_ovn_idl method: https://opendev.org/openstack/neutron/src/branch/master/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/impl_idl_ovn.py#L225 ?","commit_id":"c9cff22d60e85342f1002e41638bffce8c29f4af"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"3178269257dfd6f0810e26778e20bfff11cb46ec","unresolved":true,"context_lines":[{"line_number":58,"context_line":"                        impl_idl_ovn.OvsdbNbOvnIdl.from_worker("},{"line_number":59,"context_line":"                            worker.MaintenanceWorker))"},{"line_number":60,"context_line":"                    mech_driver.obj._post_fork_event.set()"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"                    LOG.info("},{"line_number":63,"context_line":"                        \"OVN OVSDB(NB) connection established successfully\")"},{"line_number":64,"context_line":"                except Exception as e:"}],"source_content_type":"text/x-python","patch_set":1,"id":"ae0fdde8_54509bd5","line":61,"updated":"2026-07-28 07:31:06.000000000","message":"If you need the OVN logs you need the vlog.use_python_logger I suppose, see:\nhttps://opendev.org/openstack/neutron/src/branch/master/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/impl_idl_ovn.py#L235","commit_id":"c9cff22d60e85342f1002e41638bffce8c29f4af"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"3178269257dfd6f0810e26778e20bfff11cb46ec","unresolved":true,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"                    LOG.info("},{"line_number":63,"context_line":"                        \"OVN OVSDB(NB) connection established successfully\")"},{"line_number":64,"context_line":"                except Exception as e:"},{"line_number":65,"context_line":"                    LOG.error("},{"line_number":66,"context_line":"                        \"Failed to establish OVSDB(NB) connection: %s\", e)"},{"line_number":67,"context_line":"                    raise"},{"line_number":68,"context_line":"                break"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    notifier \u003d n_rpc.get_notifier(\u0027network\u0027)"},{"line_number":71,"context_line":"    for network in plugin.get_networks(cxt):"}],"source_content_type":"text/x-python","patch_set":1,"id":"26e3fa2c_8a7ca41f","line":68,"range":{"start_line":64,"start_character":0,"end_line":68,"end_character":21},"updated":"2026-07-28 07:31:06.000000000","message":"can you please add a connection close part also? If I understand well the audit tool runs periodically so the connection should be closed after each run, am I wrong?","commit_id":"c9cff22d60e85342f1002e41638bffce8c29f4af"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"c9b3bd0daf09f6ccab8172bbb61d94af76c987fe","unresolved":true,"context_lines":[{"line_number":75,"context_line":"    for port in plugin.get_ports(cxt):"},{"line_number":76,"context_line":"        notifier.info(cxt, \u0027port.exists\u0027, {\u0027port\u0027: port})"},{"line_number":77,"context_line":"    for router in l3_plugin.get_routers(cxt):"},{"line_number":78,"context_line":"        notifier.info(cxt, \u0027router.exists\u0027, {\u0027router\u0027: router})"},{"line_number":79,"context_line":"    for floatingip in l3_plugin.get_floatingips(cxt):"},{"line_number":80,"context_line":"        notifier.info(cxt, \u0027floatingip.exists\u0027, {\u0027floatingip\u0027: floatingip})"}],"source_content_type":"text/x-python","patch_set":1,"id":"28b891aa_ec958e3b","line":78,"range":{"start_line":78,"start_character":7,"end_line":78,"end_character":63},"updated":"2026-07-28 07:01:57.000000000","message":"What is the goal of opening a DB connection to NB? The `ovn-router` plugin does not have any RPC server and will never populate via RPC the number of routers.\n\nThis tool relays on the Neutron API RPC servers that, by default in ML2/OVN, should not be enabled.\n\nThis tool needs a deeper refactor.","commit_id":"c9cff22d60e85342f1002e41638bffce8c29f4af"},{"author":{"_account_id":36760,"name":"Jimin Shin","display_name":"Jimin Shin","email":"jimin3.shin@samsung.com","username":"Jimin"},"change_message_id":"b260bb57fd141693d9d6fe18b0a2fe0e370f4f97","unresolved":true,"context_lines":[{"line_number":75,"context_line":"    for port in plugin.get_ports(cxt):"},{"line_number":76,"context_line":"        notifier.info(cxt, \u0027port.exists\u0027, {\u0027port\u0027: port})"},{"line_number":77,"context_line":"    for router in l3_plugin.get_routers(cxt):"},{"line_number":78,"context_line":"        notifier.info(cxt, \u0027router.exists\u0027, {\u0027router\u0027: router})"},{"line_number":79,"context_line":"    for floatingip in l3_plugin.get_floatingips(cxt):"},{"line_number":80,"context_line":"        notifier.info(cxt, \u0027floatingip.exists\u0027, {\u0027floatingip\u0027: floatingip})"}],"source_content_type":"text/x-python","patch_set":1,"id":"d382be11_b4522487","line":78,"range":{"start_line":78,"start_character":7,"end_line":78,"end_character":63},"in_reply_to":"28b891aa_ec958e3b","updated":"2026-08-06 10:49:14.000000000","message":"The neutron-usage-audit tool\u0027s reason for existing is still valid: adding it was agreed upon in the bug report [1] and in the weekly drivers meeting [2].\n\nExtending the tool to report router AZ information requires an OVN NB DB connection internally, which is why I made this change. The call chain is\nas follows, and it blocks waiting for the NB DB connection:\n\n_add_az_to_response()                                   neutron/db/availability_zone/router.py:34\n  → OVNL3RouterPlugin.get_router_availability_zones()   neutron/services/ovn_l3/plugin.py:410\n  → self._nb_ovn → mech_driver.nb_ovn (property)\n  → self._post_fork_event.wait()                        mech_driver.py:173-175\n\nNote that this tool uses oslo_messaging to emit notifications; it has nothing to do with the Neutron API RPC server.\n\nThere may be alternatives to the approach I took:\n\n1. Change the router AZ lookup to read from the Neutron DB instead of the OVN NB. The router\u0027s AZ hints (or the default AZs) are already stored verbatim in the NB, so there is effectively no reason to go to the NB at all. This fixes the problem in the API itself and requires no change to the audit tool.\n2. Alternatively, convert the tool to be API-based.\n\nIf you have other ideas, I\u0027d appreciate hearing them!\n\n[1] https://bugs.launchpad.net/neutron/+bug/2131072\n[2] https://meetings.opendev.org/meetings/neutron_drivers/2025/neutron_drivers.2025-12-05-14.01.log.html","commit_id":"c9cff22d60e85342f1002e41638bffce8c29f4af"}]}
