Merge pull request #407 from stevvooe/log-canonical-digest

log canonical digest on verification error
This commit is contained in:
Stephen Day 2015-04-21 13:03:32 -07:00
commit 5f7693da80

View file

@ -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"),