diff options
author | Nalin Dahyabhai <nalin@redhat.com> | 2021-04-14 13:35:43 -0400 |
---|---|---|
committer | Nalin Dahyabhai <nalin@redhat.com> | 2021-04-20 15:44:39 -0400 |
commit | fd9dd7065d440f9d44d51ddccbda20c01ccdc1aa (patch) | |
tree | 70ff833a098443b7993195c41b67b3741c7b6876 /pkg/domain | |
parent | 2a32fc3e403e4b70fb68fda564cbdf33b7dd5326 (diff) | |
download | podman-fd9dd7065d440f9d44d51ddccbda20c01ccdc1aa.tar.gz podman-fd9dd7065d440f9d44d51ddccbda20c01ccdc1aa.tar.bz2 podman-fd9dd7065d440f9d44d51ddccbda20c01ccdc1aa.zip |
rmi: don't break when the image is missing a manifest
In libpod/image.Image.Remove(), if the attempt to find the image's
parent fails for any reason, log a warning and proceed as though it
didn't have one instead of failing, which would leave us unable to
remove the image without resetting everything.
In libpod/Runtime.RemoveImage(), if we can't determine if an image has
children, log a warning, and assume that it doesn't have any instead of
failing, which would leave us unable to remove the image without
resetting everything.
In pkg/domain/infra/abi.ImageEngine.Remove(), when attempting to remove
all images, if we encounter an error checking if a given image has
children, log a warning, and assume that it doesn't have any instead of
failing, which would leave us unable to remove the image without
resetting everything.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Diffstat (limited to 'pkg/domain')
-rw-r--r-- | pkg/domain/infra/abi/images.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/domain/infra/abi/images.go b/pkg/domain/infra/abi/images.go index c02eb2bfc..84c7ebecd 100644 --- a/pkg/domain/infra/abi/images.go +++ b/pkg/domain/infra/abi/images.go @@ -620,8 +620,8 @@ func (ir *ImageEngine) Remove(ctx context.Context, images []string, opts entitie for _, img := range storageImages { isParent, err := img.IsParent(ctx) if err != nil { - rmErrors = append(rmErrors, err) - continue + logrus.Warnf("%v, ignoring the error", err) + isParent = false } // Skip parent images. if isParent { |