Skip to content

Commit 8ae2419

Browse files
authored
Merge pull request #181 from stackhpc/upstream/yoga-2024-10-07
Synchronise yoga with upstream
2 parents 8d29164 + dcb30b5 commit 8ae2419

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

neutron/agent/ovn/metadata/agent.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,14 @@ class PortBindingChassisCreatedEvent(PortBindingChassisEvent):
106106
LOG_MSG = "Port %s in datapath %s bound to our chassis"
107107

108108
def __init__(self, metadata_agent):
109-
events = (self.ROW_UPDATE,)
109+
events = (self.ROW_CREATE, self.ROW_UPDATE,)
110110
super(PortBindingChassisCreatedEvent, self).__init__(
111111
metadata_agent, events)
112112

113113
def match_fn(self, event, row, old):
114114
try:
115115
return (row.chassis[0].name == self.agent.chassis and
116-
not old.chassis)
116+
(event == self.ROW_CREATE or not old.chassis))
117117
except (IndexError, AttributeError):
118118
return False
119119

@@ -297,8 +297,9 @@ def start(self):
297297
self.conf, self.chassis, sb_idl=self.sb_idl)
298298
self._proxy.run()
299299

300-
# Do the initial sync.
301-
self.sync()
300+
# Do the initial sync. Provisioning handled by
301+
# PortBindingChassisCreatedEvent on initial db dump
302+
self.sync(provision=False)
302303

303304
# Register the agent with its corresponding Chassis
304305
self.register_metadata_agent()
@@ -349,7 +350,7 @@ def get_networks_datapaths(self):
349350
return set(p.datapath for p in self._vif_ports(ports))
350351

351352
@_sync_lock
352-
def sync(self):
353+
def sync(self, provision=True):
353354
"""Agent sync.
354355
355356
This function will make sure that all networks with ports in our
@@ -379,8 +380,9 @@ def sync(self):
379380
# resync all network namespaces based on the associated datapaths,
380381
# even those that are already running. This is to make sure
381382
# everything within each namespace is up to date.
382-
for datapath in net_datapaths:
383-
self.provision_datapath(datapath)
383+
if provision:
384+
for datapath in net_datapaths:
385+
self.provision_datapath(datapath)
384386

385387
@staticmethod
386388
def _get_veth_name(datapath):

tox.ini

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ envlist = docs,py38,pep8
33
minversion = 3.18.0
44
skipsdist = False
55
ignore_basepython_conflict = True
6+
# Cap setuptools via virtualenv to prevent compatibility issue with yoga
7+
# branch's upper constraint of 'packaging' package (21.3).
8+
requires =
9+
virtualenv<20.26.4
10+
tox<4
611

712
[testenv]
813
basepython = {env:TOX_PYTHON:python3}

zuul.d/job-templates.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999

100100
- project-template:
101101
name: neutron-periodic-jobs
102-
periodic:
102+
periodic-weekly:
103103
jobs:
104104
- neutron-functional
105105
- neutron-fullstack

0 commit comments

Comments
 (0)