summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-06-15 19:46:31 +0000
committerGerrit Code Review <review@openstack.org>2017-06-15 19:46:31 +0000
commitb4400b2689fabbb3c7578b552fa3e9c3e8e5d806 (patch)
tree90941351db2a638e4f90d07da006ac5781681b46
parent38243ce03ff2487436d2ca056e298e9ac903ddde (diff)
parent7b67e63e97073196658166908336cdf1ab0a581a (diff)
Merge "Retry ebtables lock acquisition failures" into stable/ocata
-rw-r--r--neutron/plugins/ml2/drivers/linuxbridge/agent/arp_protect.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/neutron/plugins/ml2/drivers/linuxbridge/agent/arp_protect.py b/neutron/plugins/ml2/drivers/linuxbridge/agent/arp_protect.py
index ec05b12..c573848 100644
--- a/neutron/plugins/ml2/drivers/linuxbridge/agent/arp_protect.py
+++ b/neutron/plugins/ml2/drivers/linuxbridge/agent/arp_protect.py
@@ -16,6 +16,7 @@
16import netaddr 16import netaddr
17from oslo_concurrency import lockutils 17from oslo_concurrency import lockutils
18from oslo_log import log as logging 18from oslo_log import log as logging
19import tenacity
19 20
20from neutron._i18n import _LI 21from neutron._i18n import _LI
21from neutron.agent.linux import ip_lib 22from neutron.agent.linux import ip_lib
@@ -189,6 +190,11 @@ def _delete_mac_spoofing_protection(vifs, current_rules):
189NAMESPACE = None 190NAMESPACE = None
190 191
191 192
193@tenacity.retry(
194 wait=tenacity.wait_exponential(multiplier=0.01),
195 retry=tenacity.retry_if_exception(lambda e: e.returncode == 255),
196 reraise=True
197)
192def ebtables(comm): 198def ebtables(comm):
193 execute = ip_lib.IPWrapper(NAMESPACE).netns.execute 199 execute = ip_lib.IPWrapper(NAMESPACE).netns.execute
194 return execute(['ebtables', '--concurrent'] + comm, run_as_root=True) 200 return execute(['ebtables', '--concurrent'] + comm, run_as_root=True)