From 77b30cfb2573520edd1cbdf41f03d779e97fa63b Mon Sep 17 00:00:00 2001 From: Stephen J Day Date: Tue, 21 Apr 2015 11:34:18 -0700 Subject: [PATCH] log canonical digest on verification error Signed-off-by: Stephen J Day --- docs/storage/layerwriter.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/storage/layerwriter.go b/docs/storage/layerwriter.go index fe118597..0a42aa40 100644 --- a/docs/storage/layerwriter.go +++ b/docs/storage/layerwriter.go @@ -345,6 +345,8 @@ func (lw *layerWriter) validateLayer(dgst digest.Digest) (digest.Digest, error) } if !verified { + ctxu.GetLoggerWithField(lw.layerStore.repository.ctx, "canonical", dgst). + Errorf("canonical digest does match provided digest") return "", distribution.ErrLayerInvalidDigest{ Digest: dgst, Reason: fmt.Errorf("content does not match digest"),