Merge "Skip update of vip sg if lb is gone"

This commit is contained in:
Zuul 2020-09-30 11:43:57 +00:00 committed by Gerrit Code Review
commit dadd039eb9
1 changed files with 4 additions and 3 deletions

View File

@ -356,11 +356,12 @@ class LBaaSv2Driver(base.LBaaSDriver):
# NOTE(maysams): When ovn-octavia provider is used # NOTE(maysams): When ovn-octavia provider is used
# there is no need to set a security group for # there is no need to set a security group for
# the load balancer as it wouldn't be enforced. # the load balancer as it wouldn't be enforced.
if not CONF.octavia_defaults.enforce_sg_rules: if not CONF.octavia_defaults.enforce_sg_rules and result:
os_net = clients.get_network_client() os_net = clients.get_network_client()
vip_port = self._get_vip_port(loadbalancer) vip_port = self._get_vip_port(loadbalancer)
os_net.update_port(vip_port.id, security_groups=[]) if vip_port:
loadbalancer['security_groups'] = [] os_net.update_port(vip_port.id, security_groups=[])
loadbalancer['security_groups'] = []
return result return result