From 7bfbd4c88ff02000da73b1455cb43fb4f2c72107 Mon Sep 17 00:00:00 2001 From: Terry Wilson Date: Tue, 20 Aug 2024 10:20:52 -0500 Subject: [PATCH 1/2] 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 70d0a71e5f5..ca89afb6041 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_port_bindings(self): return list(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 port_binding in net_port_bindings: - self.provision_datapath(port_binding) + if provision: + for port_binding in net_port_bindings: + self.provision_datapath(port_binding) @staticmethod def _get_veth_name(datapath): From 127ce0f509cac33790a34813fc57a043972f4c30 Mon Sep 17 00:00:00 2001 From: Rodolfo Alonso Hernandez Date: Mon, 23 Sep 2024 14:58:16 +0000 Subject: [PATCH 2/2] [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: Id3defceaeea674b735cd997131f42f2ab772fa1b --- 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 8bbdd8a3ef6..759835d292f 100644 --- a/zuul.d/job-templates.yaml +++ b/zuul.d/job-templates.yaml @@ -124,7 +124,7 @@ - project-template: name: neutron-periodic-jobs - periodic: + periodic-weekly: jobs: - neutron-functional - neutron-functional-with-uwsgi-fips