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: #1762895
Change-Id: I798d32d04b679b4c3cfb48adbc21dade102b8ce3
This commit is contained in:
Hongbin Lu 2018-03-31 23:31:03 +00:00
parent 42059ad3bf
commit 0644351f22

View File

@ -1155,6 +1155,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)