Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-61907

oc image mirror should handle uncompressed layers when target registry doesn't support them

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • 4.21
    • oc
    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The oc image mirror command fails when mirroring images with uncompressed layers to registries like quay.io that don't accept them. While oc image mirror correctly mirrors images as-is, it should provide a fallback mechanism when the target registry rejects uncompressed layers.

      The Kubernetes pause image (registry.k8s.io/pause:3.10) contains uncompressed layers that quay.io rejects, breaking automation. Currently, we must manually exclude these images and mirror them with skopeo instead:

      # This fails:
      echo "registry.k8s.io/pause:3.10 quay.io/bertinatto/community-e2e-images:e2e-25-registry-k8s-io-pause-3-10-b3MYAwZ_MelO9baY" | oc image mirror -f - --filter-by-os=.*
      
      # This works because apparently skopeo somehow handles the layer conversion:
      skopeo copy --all --format oci docker://registry.k8s.io/pause:3.10 docker://quay.io/dest/pause:3.10
      

      Every Kubernetes version update with a new pause image requires manual intervention to mirror the image with skopeo, and creating/merging a PR to openshift/release to manually mirror the image in metal jobs, delaying development work. For context, the exception [0] we have in openshift/origin for the pause image requires us to manually mirror all versions of the pause image in metal jobs[1].

      oc image mirror should detect when the target registry rejects uncompressed layers and automatically handle the conversion, similar to how skopeo does.

      [0] https://github.com/openshift/origin/blob/922dcc636df973571cfee35fa782728013bacd17/test/extended/util/image/image.go#L223-L226

      [1] https://github.com/openshift/release/blob/master/ci-operator/step-registry/baremetalds/e2e/test/baremetalds-e2e-test-commands.sh#L40-L62

              rh-ee-bpalmer Bryce Palmer
              fbertina@redhat.com Fabio Bertinatto
              None
              None
              Nidan Gavali Nidan Gavali
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: