From 44d8c653b0ea5e7c109639b6a06d9084f23c0433 Mon Sep 17 00:00:00 2001 From: Hongbin Lu Date: Sat, 31 Mar 2018 23:31:03 +0000 Subject: [PATCH] Delete sandbox on capsule delete We need to delete the sandbox for cleaning up the networking resources. Otherwise, the neutron ports of the capsule won't be cleaned up. Closes-Bug: #1771640 Closes-Bug: #1762895 Change-Id: I798d32d04b679b4c3cfb48adbc21dade102b8ce3 (cherry picked from commit 0644351f225110ee4643651eba1fd6194dce1b57) --- zun/compute/manager.py | 1 + 1 file changed, 1 insertion(+) diff --git a/zun/compute/manager.py b/zun/compute/manager.py index 1189d83da..d03816a65 100644 --- a/zun/compute/manager.py +++ b/zun/compute/manager.py @@ -1037,6 +1037,7 @@ class Manager(periodic_task.PeriodicTasks): container = \ objects.Container.get_by_uuid(context, capsule.containers_uuids[0]) + self._delete_sandbox(context, container, reraise=False) self.container_delete(context, container, force=True) except Exception as e: LOG.exception(e)