Do not fail on missing logical router ports
set_gateway_mtu runs for all the gateway ports for a network and if one of the ports get's deleted in meanwhile whole transaction fails. Added if_exists=True so the transaction do not fail for such deleted ports. Also update minimal version of "ovsdbapp" required for this. Depends-On: https://review.opendev.org/c/openstack/ovsdbapp/+/919696 Depends-On: https://review.opendev.org/c/openstack/requirements/+/920062 Closes-Bug: #2065701 Related-Bug: #2060163 Change-Id: Ie0ce420414f1e6056d9df2733b7446d02c89fcfc
This commit is contained in:
parent
c89b50c639
commit
7967627035
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user