The oc mirror command fails with error skipping mirror: "nvcr.io/nvidia/k8s/container-toolkit@sha256:489125ceae5864280e4d6a9ab52ab0f650b3179349a7298c4a204feb60b661a" is not a valid image reference: invalid checksum digest length.

Solution Verified - Updated -

Environment

  • Red Hat OpenShift Container Platform 4.11

Issue

  • Facing below error while mirroring:
errors during mirroring. the full contents of the catalog may not have been mirrored: couldn't parse image for mirroring (nvcr.io/nvidia/k8s/container-toolkit@sha256:489125ceae5864280e4d6a9ab52ab0f650b3179349a7298c4a204feb60b661a), skipping mirror: "nvcr.io/nvidia/k8s/container-toolkit@sha256:489125ceae5864280e4d6a9ab52ab0f650b3179349a7298c4a204feb60b661a" is not a valid image reference: invalid checksum digest length

Resolution

  • There was a GitHub issue opened for this which states adding 5 infront in the digest fixes the issue.
  • Use --skip-metadata-check option in the oc mirror command to overcome this issue.

Root Cause

  • The digest is missing one character due to which this issue happened.
len('489125ceae5864280e4d6a9ab52ab0f650b3179349a7298c4a204feb60b661a') --> 63

Diagnostic Steps

  • Execute the oc mirror command:
errors during mirroring. the full contents of the catalog may not have been mirrored: couldn't parse image for mirroring (nvcr.io/nvidia/k8s/container-toolkit@sha256:489125ceae5864280e4d6a9ab52ab0f650b3179349a7298c4a204feb60b661a), skipping mirror: "nvcr.io/nvidia/k8s/container-toolkit@sha256:489125ceae5864280e4d6a9ab52ab0f650b3179349a7298c4a204feb60b661a" is not a valid image reference: invalid checksum digest length
wrote mirroring manifests to oc-mirror-workspace/operators.1681405309/manifests-certified-operator-index
  • Check the events:
 Warning  Failed  13s   kubelet  Failed to pull image "nvcr.io/nvidia/gpu-operator@sha256:54d5846c0291db621931a8544c9cb6437512470a93278ca9130ba73f2e2f0055": rpc error: code = Unknown desc = (Mirrors also failed: [abc.com/nvidia/gpu-operator@sha256:54d5846c0291db621931a8544c9cb6437512470a93278ca9130ba73f2e2f0055: reading manifest sha256:54d5846c0291db621931a8544c9cb6437512470a93278ca9130ba73f2e2f0055 in abc.com/nvidia/gpu-operator: manifest unknown: The named manifest is not known to the registry.]): nvcr.io/nvidia/gpu-operator@sha256:54d5846c0291db621931a8544c9cb6437512470a93278ca9130ba73f2e2f0055: pinging container registry nvcr.io: Get "https://nvcr.io/v2/": dial tcp x.x.x.x:443: connect: network is unreachable

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments