summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-11-14 13:35:41 +0000
committerGerrit Code Review <review@openstack.org>2018-11-14 13:35:41 +0000
commitcc05180e323b38d43cf5a806d03d8822fc5fc5df (patch)
tree1aa492b3efe6490c3dec79feb00f968fffa5c8b3
parentb52c0e90f0b00a7089532b66576923c8299687f3 (diff)
parent18e566c9c96b3f815df4f2867cc2d459f527c5b5 (diff)
Merge "Fix update_port() SubnetNotFound race conditional"
-rw-r--r--networking_ovn/common/ovn_client.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/networking_ovn/common/ovn_client.py b/networking_ovn/common/ovn_client.py
index 3476227..7a85f10 100644
--- a/networking_ovn/common/ovn_client.py
+++ b/networking_ovn/common/ovn_client.py
@@ -212,9 +212,12 @@ class OVNClient(object):
212 tag = binding_prof.get('tag', []) 212 tag = binding_prof.get('tag', [])
213 address = port['mac_address'] 213 address = port['mac_address']
214 for ip in port.get('fixed_ips', []): 214 for ip in port.get('fixed_ips', []):
215 try:
216 subnet = self._plugin.get_subnet(
217 n_context.get_admin_context(), ip['subnet_id'])
218 except n_exc.SubnetNotFound:
219 continue
215 address += ' ' + ip['ip_address'] 220 address += ' ' + ip['ip_address']
216 subnet = self._plugin.get_subnet(n_context.get_admin_context(),
217 ip['subnet_id'])
218 cidrs += ' {}/{}'.format(ip['ip_address'], 221 cidrs += ' {}/{}'.format(ip['ip_address'],
219 subnet['cidr'].split('/')[1]) 222 subnet['cidr'].split('/')[1])
220 port_security, new_macs = \ 223 port_security, new_macs = \