diff options
author | Nicolas Lacasse <nlacasse@google.com> | 2018-12-13 15:36:59 -0800 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-12-13 15:38:10 -0800 |
commit | 1775a0e11e56ee619a35b46d3d1561d99095a01c (patch) | |
tree | 035172d1d7b90a4f019a25f2ee2380f60c305e2b /runsc/boot | |
parent | a0c8aeb73d76e5d22af3bd8012c05f307ca449c7 (diff) |
container.Destroy should clean up container metadata even if other cleanups fail
If the sandbox process is dead (because of a panic or some other problem),
container.Destroy will never remove the container metadata file, since it will
always fail when calling container.stop().
This CL changes container.Destroy() to always perform the three necessary
cleanup operations:
* Stop the sandbox and gofer processes.
* Remove the container fs on the host.
* Delete the container metadata directory.
Errors from these three operations will be concatenated and returned from
Destroy().
PiperOrigin-RevId: 225448164
Change-Id: I99c6311b2e4fe5f6e2ca991424edf1ebeae9df32
Diffstat (limited to 'runsc/boot')
0 files changed, 0 insertions, 0 deletions