Skip to content

Commit

Permalink
Merge pull request moby#49009 from vvoland/c8d-tag-remove-warning
Browse files Browse the repository at this point in the history
c8d/tag: Don't log a warning if the source image is not dangling
  • Loading branch information
thaJeztah authored Dec 2, 2024
2 parents 796fcf6 + a93f6c6 commit 87fbd9c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion daemon/containerd/image_tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ func (i *ImageService) TagImage(ctx context.Context, imageID image.ID, newTag re

// Delete the source dangling image, as it's no longer dangling.
if err := i.images.Delete(context.WithoutCancel(ctx), danglingImageName(targetImage.Target.Digest)); err != nil {
logger.WithError(err).Warn("unexpected error when deleting dangling image")
if !cerrdefs.IsNotFound(err) {
logger.WithError(err).Warn("unexpected error when deleting dangling image")
}
}

return nil
Expand Down

0 comments on commit 87fbd9c

Please sign in to comment.