Skip to content

Commit f70ef2c

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "[stable only] Do not fail on missing logical router ports" into stable/2024.1
2 parents 3cd00ef + 5bdd0ef commit f70ef2c

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2058,7 +2058,8 @@ def set_gateway_mtu(self, context, prov_net, txn=None):
20582058
for port in ports:
20592059
lrp_name = utils.ovn_lrouter_port_name(port['id'])
20602060
options = self._gen_router_port_options(port, prov_net)
2061-
commands.append(self._nb_idl.lrp_set_options(lrp_name, **options))
2061+
commands.append(self._nb_idl.update_lrouter_port(
2062+
lrp_name, if_exists=True, **options))
20622063
self._transaction(commands, txn=txn)
20632064

20642065
def _check_network_changes_in_ha_chassis_groups(self,

neutron/tests/unit/fake_resources.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ def __init__(self, **kwargs):
6363
self.delete_lswitch_port = mock.Mock()
6464
self.get_acls_for_lswitches = mock.Mock()
6565
self.lrp_del = mock.Mock()
66-
self.lrp_set_options = mock.Mock()
6766
self.lr_add = mock.Mock()
6867
self.update_lrouter = mock.Mock()
6968
self.lr_del = mock.Mock()

neutron/tests/unit/plugins/ml2/drivers/ovn/mech_driver/test_mech_driver.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2573,8 +2573,8 @@ def _test_update_network_fragmentation(self, new_mtu, expected_opts, grps,
25732573
self.mech_driver.update_network_postcommit(fake_ctx)
25742574

25752575
lrp_name = ovn_utils.ovn_lrouter_port_name(port['port']['id'])
2576-
self.nb_ovn.lrp_set_options.assert_called_once_with(
2577-
lrp_name, **expected_opts)
2576+
self.nb_ovn.update_lrouter_port.assert_called_once_with(
2577+
lrp_name, if_exists=True, **expected_opts)
25782578

25792579
def test_update_network_need_to_frag_enabled(self):
25802580
ovn_conf.cfg.CONF.set_override('ovn_emit_need_to_frag', True,

neutron/tests/unit/services/ovn_l3/test_plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1987,7 +1987,7 @@ def test_add_router_interface_need_to_frag_enabled_then_remove(
19871987
self.l3_inst._nb_ovn.add_lrouter_port.assert_called_once_with(
19881988
**fake_router_port_assert)
19891989
# Since if_exists = True it will safely return
1990-
self.l3_inst._nb_ovn.lrp_set_options(
1990+
self.l3_inst._nb_ovn.update_lrouter_port(
19911991
name='lrp-router-port-id', if_exists=True,
19921992
options=fake_router_port_assert)
19931993
# If no if_exists is provided, it is defaulted to true, so this

0 commit comments

Comments
 (0)