Avoid controller restart when Port is not connected to Trunk
During Namespace deletion it's possible that a Port
was not connected to a Trunk when attempting to release the
VIF, which causes a NotFound exception and restarts the
controller. This commit fixes the issue by ignoring the exception.
Closes-bug:
@@ -154,7 +154,10 @@ class NestedVlanPodVIFDriver(nested_vif.NestedPodVIFDriver):
os_net = clients.get_network_client()
parent_port = self._get_parent_port(pod)
trunk_id = self._get_trunk_id(parent_port)
+ try:
self._remove_subport(trunk_id, vif.id)
+ except os_exc.NotFoundException:
+ pass
self._release_vlan_id(vif.vlan_id)
os_net.delete_port(vif.id)
