Skip to content

Commit

Permalink
image removal: ignore unknown-layer errors
Browse files Browse the repository at this point in the history
[NO TESTS NEEDED] as I have absolutely no idea how to force a reliable
reproducer.

Fixes: containers#9588
Signed-off-by: Valentin Rothberg <[email protected]>
  • Loading branch information
vrothberg committed Mar 4, 2021
1 parent 8336700 commit e43385e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/domain/infra/abi/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -583,8 +583,9 @@ func (ir *ImageEngine) Remove(ctx context.Context, images []string, opts entitie
report.Deleted = append(report.Deleted, results.Deleted)
report.Untagged = append(report.Untagged, results.Untagged...)
return nil
case storage.ErrImageUnknown:
// The image must have been removed already (see #6510).
case storage.ErrImageUnknown, storage.ErrLayerUnknown:
// The image must have been removed already (see #6510)
// or the storage is corrupted (see #9617).
report.Deleted = append(report.Deleted, img.ID())
report.Untagged = append(report.Untagged, img.ID())
return nil
Expand Down

0 comments on commit e43385e

Please sign in to comment.