Skip to content

Container: not functional when upstream registry is unavailable #186

Description

@mxey

The container handler only caches blobs, but even those will not be available if the auth URL for Docker Hub is down.

In handleBlobDownload, getAuthToken is called unconditionally and if it fails, the proxy will respond with an error:

	// Get auth token for upstream
	token, err := h.getAuthToken(r.Context(), name, "pull")
	if err != nil {
		h.proxy.Logger.Error("failed to get auth token", "error", err)
		h.containerError(w, http.StatusUnauthorized, "UNAUTHORIZED", "failed to authenticate")
		return
	}

Only on success will GetOrFetchArtifactFromURLWithHeaders be called, which can respond from cache.

Even besides this, a pull of a specific image digest will still fail, because while the blobs are cached, the manifests are not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions