From 952e960414e7c15d4d4351bf2300ce53a69e4051 Mon Sep 17 00:00:00 2001 From: Terry Wilson Date: Tue, 20 Aug 2024 10:20:52 -0500 Subject: [PATCH 1/3] Handle creation of Port_Binding with chassis set When there is a backlog of notifications to be sent, it is possible that ovsdb-server will merge insert and update notifications. Due to this, we need to handle the situation where we see a Port_Binding created with the chassis set. Closes-Bug: #2017748 Change-Id: Idfae87cf6c60e9e18ede91ea20857cea5322738c --- neutron/agent/ovn/metadata/agent.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/neutron/agent/ovn/metadata/agent.py b/neutron/agent/ovn/metadata/agent.py index 54a8e54056e..4bc88647739 100644 --- a/neutron/agent/ovn/metadata/agent.py +++ b/neutron/agent/ovn/metadata/agent.py @@ -106,14 +106,14 @@ class PortBindingChassisCreatedEvent(PortBindingChassisEvent): LOG_MSG = "Port %s in datapath %s bound to our chassis" def __init__(self, metadata_agent): - events = (self.ROW_UPDATE,) + events = (self.ROW_CREATE, self.ROW_UPDATE,) super(PortBindingChassisCreatedEvent, self).__init__( metadata_agent, events) def match_fn(self, event, row, old): try: return (row.chassis[0].name == self.agent.chassis and - not old.chassis) + (event == self.ROW_CREATE or not old.chassis)) except (IndexError, AttributeError): return False @@ -297,8 +297,9 @@ def start(self): self.conf, self.chassis, sb_idl=self.sb_idl) self._proxy.run() - # Do the initial sync. - self.sync() + # Do the initial sync. Provisioning handled by + # PortBindingChassisCreatedEvent on initial db dump + self.sync(provision=False) # Register the agent with its corresponding Chassis self.register_metadata_agent() @@ -349,7 +350,7 @@ def get_networks_datapaths(self): return set(p.datapath for p in self._vif_ports(ports)) @_sync_lock - def sync(self): + def sync(self, provision=True): """Agent sync. This function will make sure that all networks with ports in our @@ -379,8 +380,9 @@ def sync(self): # resync all network namespaces based on the associated datapaths, # even those that are already running. This is to make sure # everything within each namespace is up to date. - for datapath in net_datapaths: - self.provision_datapath(datapath) + if provision: + for datapath in net_datapaths: + self.provision_datapath(datapath) @staticmethod def _get_veth_name(datapath): From 582136424455440c5722a8f81af049f7d3f39c44 Mon Sep 17 00:00:00 2001 From: Elod Illes Date: Fri, 27 Sep 2024 09:39:53 +0200 Subject: [PATCH 2/3] [stable-only] Cap setuptools <71.0.0 py39 jobs (on ubuntu-focal) started to fail due to recent virtualenv release (20.26.4) on Yoga (which bundles setuptools), because we have 'packaging==21.3' in this branch that is not compatible with newer setuptools [1]. setuptools is bundled in virtualenv, so it has to be capped via the virtualenv package. tox also needed to be capped (<4) as gate uses tox 3.28.0, but with capping virtualenv we pull in latest tox as well, which would cause other errors. [1] https://github.com/pypa/setuptools/issues/4483 Closes-Bug: #2082234 Change-Id: I08e57e3b4c905bd679038c89185e54f6ab79738a --- tox.ini | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tox.ini b/tox.ini index 00419ca9672..71c58df50f1 100644 --- a/tox.ini +++ b/tox.ini @@ -3,6 +3,11 @@ envlist = docs,py38,pep8 minversion = 3.18.0 skipsdist = False ignore_basepython_conflict = True +# Cap setuptools via virtualenv to prevent compatibility issue with yoga +# branch's upper constraint of 'packaging' package (21.3). +requires = + virtualenv<20.26.4 + tox<4 [testenv] basepython = {env:TOX_PYTHON:python3} From b285d6ff2f178e3b1c7fb7c055d37ac4f8790cfa Mon Sep 17 00:00:00 2001 From: Rodolfo Alonso Hernandez Date: Mon, 23 Sep 2024 15:04:40 +0000 Subject: [PATCH 3/3] [unmaintained-only] Periodic jobs will be weekly only As agreed in the Neutron CI meeting, the unmaintained branches periodic jobs will be weekly only [1]. [1]https://meetings.opendev.org/meetings/neutron_ci/2024/neutron_ci.2024-09-23-14.01.log.html#l-97 Depends-On: https://review.opendev.org/c/openstack/neutron-tempest-plugin/+/930594 Change-Id: I0bc95e3705bd3114c36e1ec95701da2e2d13b13f --- zuul.d/job-templates.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zuul.d/job-templates.yaml b/zuul.d/job-templates.yaml index 542b1aafd47..76cc485ce37 100644 --- a/zuul.d/job-templates.yaml +++ b/zuul.d/job-templates.yaml @@ -99,7 +99,7 @@ - project-template: name: neutron-periodic-jobs - periodic: + periodic-weekly: jobs: - neutron-functional - neutron-fullstack