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 0644351f22)
This commit is contained in:
Hongbin Lu 2018-03-31 23:31:03 +00:00
parent bcc0a0913b
commit 44d8c653b0
1 changed files with 1 additions and 0 deletions

View File

@ -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)