Add debug output to manifest list parsing
Akihiro Suda authored on 2017/03/03 13:09:38... | ... |
@@ -672,6 +672,7 @@ func (p *v2Puller) pullManifestList(ctx context.Context, ref reference.Named, mf |
672 | 672 |
return "", "", err |
673 | 673 |
} |
674 | 674 |
|
675 |
+ logrus.Debugf("%s resolved to a manifestList object with %d entries; looking for a os/arch match", ref, len(mfstList.Manifests)) |
|
675 | 676 |
var manifestDigest digest.Digest |
676 | 677 |
for _, manifestDescriptor := range mfstList.Manifests { |
677 | 678 |
// TODO(aaronl): The manifest list spec supports optional |
... | ... |
@@ -679,12 +680,15 @@ func (p *v2Puller) pullManifestList(ctx context.Context, ref reference.Named, mf |
679 | 679 |
// Once they are, their values should be interpreted here. |
680 | 680 |
if manifestDescriptor.Platform.Architecture == runtime.GOARCH && manifestDescriptor.Platform.OS == runtime.GOOS { |
681 | 681 |
manifestDigest = manifestDescriptor.Digest |
682 |
+ logrus.Debugf("found match for %s/%s with media type %s, digest %s", runtime.GOOS, runtime.GOARCH, manifestDescriptor.MediaType, manifestDigest.String()) |
|
682 | 683 |
break |
683 | 684 |
} |
684 | 685 |
} |
685 | 686 |
|
686 | 687 |
if manifestDigest == "" { |
687 |
- return "", "", errors.New("no supported platform found in manifest list") |
|
688 |
+ errMsg := fmt.Sprintf("no matching manifest for %s/%s in the manifest list entries", runtime.GOOS, runtime.GOARCH) |
|
689 |
+ logrus.Debugf(errMsg) |
|
690 |
+ return "", "", errors.New(errMsg) |
|
688 | 691 |
} |
689 | 692 |
|
690 | 693 |
manSvc, err := p.repo.Manifests(ctx) |