diff --git a/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/maintenance.py b/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/maintenance.py index ccaab02ce81..dd8f92125ed 100644 --- a/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/maintenance.py +++ b/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/maintenance.py @@ -617,7 +617,7 @@ class DBInconsistenciesPeriodics(SchemaAwarePeriodicsBase): admin_context = n_context.get_admin_context() cmds = [] for ls in self._nb_idl.ls_list().execute(check_error=True): - network_id = ls.name.strip('neutron-') + network_id = ls.name.replace('neutron-', '') legacy_name = utils.ovn_provnet_port_name(network_id) legacy_port = None segment_id = None diff --git a/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py b/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py index 4bff714529a..fd348f24d1c 100644 --- a/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py +++ b/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py @@ -570,7 +570,7 @@ class OVNClient(object): ovn_network_name = ovn_port.external_ids.get( ovn_const.OVN_NETWORK_NAME_EXT_ID_KEY) - network_id = ovn_network_name.strip('neutron-') + network_id = ovn_network_name.replace('neutron-', '') with self._nb_idl.transaction(check_error=True) as txn: txn.add(self._nb_idl.delete_lswitch_port(