From 56b18134fae5aa777389d90102a086e2dcb14725 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 --- registry/storage/layerwriter.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/registry/storage/layerwriter.go b/registry/storage/layerwriter.go index fe118597..0a42aa40 100644 --- a/registry/storage/layerwriter.go +++ b/registry/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"),