reliably remove image when content missing

Signed-off-by: yason <yan.xuean@zte.com.cn>
This commit is contained in:
yason
2017-12-12 17:45:06 +08:00
parent 4762b3e273
commit 5f6d9a5fcc
2 changed files with 23 additions and 7 deletions

View File

@@ -59,6 +59,9 @@ import (
// if we saw an image without snapshots or with in-complete contents during startup,
// should we re-pull the image? Or should we remove the entry?
//
// yanxuean: We cann't delete image directly, because we don't know if the image
// is pulled by us. There are resource leakage.
//
// 2) Containerd suggests user to add entry before pulling the image. However if
// an error occurrs during the pulling, should we remove the entry from metadata
// store? Or should we leave it there until next startup (resource leakage)?