From eb142aac8994275627f7b9d2f0ce0f811d8b9d95 Mon Sep 17 00:00:00 2001 From: Shukui Yang Date: Tue, 1 Sep 2020 21:21:04 +0800 Subject: [PATCH] runtime: Fix /var/lib/vc/sbs/${sid} dir residual Fixes: #2921 Signed-off-by: Shukui Yang --- virtcontainers/sandbox.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virtcontainers/sandbox.go b/virtcontainers/sandbox.go index cdd2aff9d4..d8fdfa8a80 100644 --- a/virtcontainers/sandbox.go +++ b/virtcontainers/sandbox.go @@ -837,7 +837,10 @@ func (s *Sandbox) Delete() error { } s.agent.cleanup(s) - + vcStore, err := store.NewVCSandboxStore(s.ctx, s.id) + if err == nil { + vcStore.Delete() + } return s.newStore.Destroy(s.id) }