Signed-off-by: Michal Minář <miminar@redhat.com>
| ... | ... |
@@ -37,7 +37,7 @@ func (r *pullthroughBlobStore) Stat(ctx context.Context, dgst digest.Digest) (di |
| 37 | 37 |
// continue on to the code below and look up the blob in a remote store since it is not in |
| 38 | 38 |
// the local store |
| 39 | 39 |
case err != nil: |
| 40 |
- context.GetLogger(r.repo.ctx).Errorf("Failed to find blob %q: %#v", dgst.String(), err)
|
|
| 40 |
+ context.GetLogger(ctx).Errorf("Failed to find blob %q: %#v", dgst.String(), err)
|
|
| 41 | 41 |
fallthrough |
| 42 | 42 |
default: |
| 43 | 43 |
return desc, err |
| ... | ... |
@@ -50,7 +50,7 @@ func (r *pullthroughBlobStore) Stat(ctx context.Context, dgst digest.Digest) (di |
| 50 | 50 |
if errors.IsNotFound(err) || errors.IsForbidden(err) {
|
| 51 | 51 |
return distribution.Descriptor{}, distribution.ErrBlobUnknown
|
| 52 | 52 |
} |
| 53 |
- context.GetLogger(r.repo.ctx).Errorf("Error retrieving image stream for blob: %s", err)
|
|
| 53 |
+ context.GetLogger(ctx).Errorf("Error retrieving image stream for blob: %v", err)
|
|
| 54 | 54 |
return distribution.Descriptor{}, err
|
| 55 | 55 |
} |
| 56 | 56 |
|
| ... | ... |
@@ -84,17 +84,17 @@ func (r *pullthroughBlobStore) Stat(ctx context.Context, dgst digest.Digest) (di |
| 84 | 84 |
// proxyStat attempts to locate the digest in the provided remote repository or returns an error. If the digest is found, |
| 85 | 85 |
// r.digestToStore saves the store. |
| 86 | 86 |
func (r *pullthroughBlobStore) proxyStat(ctx context.Context, retriever importer.RepositoryRetriever, ref imageapi.DockerImageReference, dgst digest.Digest) (distribution.Descriptor, error) {
|
| 87 |
- context.GetLogger(r.repo.ctx).Infof("Trying to stat %q from %q", dgst, ref.Exact())
|
|
| 87 |
+ context.GetLogger(ctx).Infof("Trying to stat %q from %q", dgst, ref.Exact())
|
|
| 88 | 88 |
repo, err := retriever.Repository(ctx, ref.RegistryURL(), ref.RepositoryName(), r.pullFromInsecureRegistries) |
| 89 | 89 |
if err != nil {
|
| 90 |
- context.GetLogger(r.repo.ctx).Errorf("Error getting remote repository for image %q: %v", ref.Exact(), err)
|
|
| 90 |
+ context.GetLogger(ctx).Errorf("Error getting remote repository for image %q: %v", ref.Exact(), err)
|
|
| 91 | 91 |
return distribution.Descriptor{}, err
|
| 92 | 92 |
} |
| 93 | 93 |
pullthroughBlobStore := repo.Blobs(ctx) |
| 94 | 94 |
desc, err := pullthroughBlobStore.Stat(ctx, dgst) |
| 95 | 95 |
if err != nil {
|
| 96 | 96 |
if err != distribution.ErrBlobUnknown {
|
| 97 |
- context.GetLogger(r.repo.ctx).Errorf("Error getting pullthroughBlobStore for image %q: %v", ref.Exact(), err)
|
|
| 97 |
+ context.GetLogger(ctx).Errorf("Error getting pullthroughBlobStore for image %q: %v", ref.Exact(), err)
|
|
| 98 | 98 |
} |
| 99 | 99 |
return distribution.Descriptor{}, err
|
| 100 | 100 |
} |
| ... | ... |
@@ -112,13 +112,13 @@ func (r *pullthroughBlobStore) ServeBlob(ctx context.Context, w http.ResponseWri |
| 112 | 112 |
|
| 113 | 113 |
desc, err := store.Stat(ctx, dgst) |
| 114 | 114 |
if err != nil {
|
| 115 |
- context.GetLogger(r.repo.ctx).Errorf("Failed to stat digest %q: %v", dgst.String(), err)
|
|
| 115 |
+ context.GetLogger(ctx).Errorf("Failed to stat digest %q: %v", dgst.String(), err)
|
|
| 116 | 116 |
return err |
| 117 | 117 |
} |
| 118 | 118 |
|
| 119 | 119 |
remoteReader, err := store.Open(ctx, dgst) |
| 120 | 120 |
if err != nil {
|
| 121 |
- context.GetLogger(r.repo.ctx).Errorf("Failure to open remote store %q: %v", dgst.String(), err)
|
|
| 121 |
+ context.GetLogger(ctx).Errorf("Failure to open remote store for digest %q: %v", dgst.String(), err)
|
|
| 122 | 122 |
return err |
| 123 | 123 |
} |
| 124 | 124 |
|
| ... | ... |
@@ -151,7 +151,7 @@ func (r *pullthroughBlobStore) findCandidateRepository(ctx context.Context, sear |
| 151 | 151 |
delete(search, repo) |
| 152 | 152 |
continue |
| 153 | 153 |
} |
| 154 |
- context.GetLogger(r.repo.ctx).Infof("Found digest location from cache %q in %q: %v", dgst, repo, err)
|
|
| 154 |
+ context.GetLogger(ctx).Infof("Found digest location from cache %q in %q", dgst, repo)
|
|
| 155 | 155 |
return desc, nil |
| 156 | 156 |
} |
| 157 | 157 |
|
| ... | ... |
@@ -162,7 +162,7 @@ func (r *pullthroughBlobStore) findCandidateRepository(ctx context.Context, sear |
| 162 | 162 |
continue |
| 163 | 163 |
} |
| 164 | 164 |
r.repo.cachedLayers.RememberDigest(dgst, r.repo.blobrepositorycachettl, repo) |
| 165 |
- context.GetLogger(r.repo.ctx).Infof("Found digest location by search %q in %q: %v", dgst, repo, err)
|
|
| 165 |
+ context.GetLogger(ctx).Infof("Found digest location by search %q in %q", dgst, repo)
|
|
| 166 | 166 |
return desc, nil |
| 167 | 167 |
} |
| 168 | 168 |
|