Merge "Do not fail on missing logical router ports"

This commit is contained in:
Zuul 2024-05-23 04:00:40 +00:00 committed by Gerrit Code Review
commit 0534f5dea7
3 changed files with 6 additions and 3 deletions

View File

@ -2084,7 +2084,10 @@ class OVNClient(object):
for port in ports:
lrp_name = utils.ovn_lrouter_port_name(port['id'])
options = self._gen_router_port_options(port)
commands.append(self._nb_idl.lrp_set_options(lrp_name, **options))
# Do not fail for cases where logical router port get deleted
commands.append(self._nb_idl.lrp_set_options(lrp_name,
if_exists=True,
**options))
self._transaction(commands, txn=txn)
def _check_network_changes_in_ha_chassis_groups(self,

View File

@ -2642,7 +2642,7 @@ class TestOVNMechanismDriver(TestOVNMechanismDriverBase):
lrp_name = ovn_utils.ovn_lrouter_port_name(port['port']['id'])
self.nb_ovn.lrp_set_options.assert_called_once_with(
lrp_name, **expected_opts)
lrp_name, if_exists=True, **expected_opts)
def test_update_network_need_to_frag_enabled(self):
ovn_conf.cfg.CONF.set_override('ovn_emit_need_to_frag', True,

View File

@ -46,7 +46,7 @@ osprofiler>=2.3.0 # Apache-2.0
os-ken>=2.2.0 # Apache-2.0
os-resource-classes>=1.1.0 # Apache-2.0
ovs>=2.10.0 # Apache-2.0
ovsdbapp>=2.3.0 # Apache-2.0
ovsdbapp>=2.7.1 # Apache-2.0
psutil>=5.3.0 # BSD
pyroute2>=0.7.3;sys_platform!='win32' # Apache-2.0 (+ dual licensed GPL2)
pyOpenSSL>=17.1.0 # Apache-2.0