From 763000d72b0644dc680a569d2307b30c795451eb Mon Sep 17 00:00:00 2001 From: yatinkarel Date: Thu, 6 Jun 2024 16:17:07 +0530 Subject: [PATCH] [stable only] Fix KeyError in set_gateway_mtu Got missed in initial fixes[1], this patch fixes it. [1] https://review.opendev.org/q/I447990509cdea9830228d3bc92a97062cc57a472 Closes-Bug: #2065701 Related-Bug: #2060163 Change-Id: Icdab45ab0873c003977e3f02277d267116002973 (cherry picked from commit 0d8cc09c4a5f652503c4ba9d968959b522aca980) (cherry picked from commit 4c56dfded153b9c6412bafd65bd76d8e5d0bfe2c) (cherry picked from commit cd92d42cfa993d542d07ac7a05943b99deb8c208) --- neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py | 2 +- .../plugins/ml2/drivers/ovn/mech_driver/test_mech_driver.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 266e97f0b8c..a9dc04cecee 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 @@ -2094,7 +2094,7 @@ def set_gateway_mtu(self, context, prov_net, txn=None): lrp_name = utils.ovn_lrouter_port_name(port['id']) options = self._gen_router_port_options(port, prov_net) commands.append(self._nb_idl.update_lrouter_port( - lrp_name, if_exists=True, **options)) + lrp_name, if_exists=True, options=options)) self._transaction(commands, txn=txn) def update_network(self, context, network, original_network=None): diff --git a/neutron/tests/unit/plugins/ml2/drivers/ovn/mech_driver/test_mech_driver.py b/neutron/tests/unit/plugins/ml2/drivers/ovn/mech_driver/test_mech_driver.py index 4c61c946c2c..3ef9b2eb366 100644 --- a/neutron/tests/unit/plugins/ml2/drivers/ovn/mech_driver/test_mech_driver.py +++ b/neutron/tests/unit/plugins/ml2/drivers/ovn/mech_driver/test_mech_driver.py @@ -2447,7 +2447,7 @@ def _test_update_network_fragmentation(self, new_mtu, expected_opts, grps): lrp_name = ovn_utils.ovn_lrouter_port_name(port['port']['id']) self.nb_ovn.update_lrouter_port.assert_called_once_with( - lrp_name, if_exists=True, **expected_opts) + lrp_name, if_exists=True, options=expected_opts) def test_update_network_need_to_frag_enabled(self): ovn_conf.cfg.CONF.set_override('ovn_emit_need_to_frag', True,