Merge "Delete ports without device_owner on ns deletion"

This commit is contained in:
Zuul 2020-09-04 07:29:43 +00:00 committed by Gerrit Code Review
commit 23eae26136
1 changed files with 3 additions and 1 deletions

View File

@ -106,7 +106,9 @@ class NamespacePodSubnetDriver(default_subnet.DefaultPodSubnetDriver):
"Deleting leftovers ports before retrying", net_id)
leftover_ports = os_net.ports(network_id=net_id)
for leftover_port in leftover_ports:
if leftover_port.device_owner not in ['trunk:subport',
# NOTE(dulek): '' is there because Neutron seems to unset
# device_owner on detach.
if leftover_port.device_owner not in ['', 'trunk:subport',
kl_const.DEVICE_OWNER]:
continue
try: