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

oc-mirror v2 disk-to-mirror fails with "unauthorized: access to the requested resource is not authorized" on random images

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Normal Normal
    • None
    • 4.20.z
    • oc-mirror
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • Moderate
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description of problem:

      I am trying the file to mirror (uploading images to my local Quay) function of oc-mirror v2. Each trial, uploading of 2-3 random images are failing with "unauthorized: access to the requested resource is not authorized". After command fails, I rerun the upload command back to back and it completes successfully. I couldnt understand why this is happening every time on random images. 1 out 10 trials, it completes on the first attempt of upload. The command that I am using is oc-mirror --v2 --dest-tls-verify=false -c platform/platform_config-v2.yaml --from file://platform/mirror docker://quayregistry-quay-quay-enterprise.apps.hubcluster-hp.integration.core.bos2.lab/ngc495-v2

      Version-Release number of selected component (if applicable):

      Client Version: version.Info{Major:"", Minor:"", EmulationMajor:"", EmulationMinor:"", MinCompatibilityMajor:"", MinCompatibilityMinor:"", GitVersion:"4.20.0-202511252120.p2.g5b23c4a.assembly.stream.el9-5b23c4a", GitCommit:"5b23c4ad7a4cd047ba67796c357f3d281154decb", GitTreeState:"clean", BuildDate:"2025-11-25T21:56:51Z", GoVersion:"go1.24.6 (Red Hat 1.24.6-1.el9_6) X:strictfipsruntime", Compiler:"gc", Platform:"linux/amd64"}
      

      How reproducible:

      1. Download images to file
      2. Upload images to local Quay
      
      

      Steps to Reproduce:

      1. oc-mirror --v2 --remove-signatures=false --cache-dir operators-v2 --dest-tls-verify=false -c oc-mirror-clone/imagesetconfiguration_operators-v2.yaml file://mirror/operators-v2     
      2. oc-mirror --v2 --dest-tls-verify=false -c platform/platform_config-v2.yaml --from file://platform/mirror docker://quayregistry-quay-quay-enterprise.apps.hubcluster-hp.integration.core.bos2.lab/ngc495-v2 
          

      Actual results:

          2025/12/05 08:21:44  [INFO]   : === Results ===
      2025/12/05 08:21:44  [INFO]   :  ✗  67 / 71 operator images mirrored: Some operator images failed to be mirrored - please check the logs
      2025/12/05 08:21:44  [ERROR]  : [Worker] error mirroring image docker://registry.redhat.io/odf4/odf-csi-addons-sidecar-rhel9@sha256:b48dad7df16ca6eb69595732f0ab2fb3098113757285d7c3d43555b2e764203c (Operator bundles: [ocs-client-operator.v4.19.6-rhodf odf-csi-addons-operator.v4.19.6-rhodf rook-ceph-operator.v4.19.6-rhodf] - Operators: [ocs-client-operator odf-csi-addons-operator rook-ceph-operator]) error: copying image 1/4 from manifest list: writing blob: initiating layer upload to /v2/ngc495-v2/odf4/odf-csi-addons-sidecar-rhel9/blobs/uploads/ in quayregistry-quay-quay-enterprise.apps.hubcluster-hp.integration.core.bos2.lab: unauthorized: access to the requested resource is not authorized
      2025/12/05 08:21:44  [ERROR]  : [Worker] error mirroring image docker://registry.redhat.io/odf4/ocs-client-operator-bundle@sha256:ff42eedad71d5cfcd87a018ccb1fe78275c6fa87b01cc5c628729764aae199c8 error: skipping operator bundle docker://registry.redhat.io/odf4/ocs-client-operator-bundle@sha256:ff42eedad71d5cfcd87a018ccb1fe78275c6fa87b01cc5c628729764aae199c8 because one of its related images failed to mirror
      2025/12/05 08:21:44  [ERROR]  : [Worker] error mirroring image docker://registry.redhat.io/odf4/rook-ceph-operator-bundle@sha256:431055258c9a99942557d1d2a9246d2e28ac7e2fec06ee9de836c39b5b8fb5f1 error: skipping operator bundle docker://registry.redhat.io/odf4/rook-ceph-operator-bundle@sha256:431055258c9a99942557d1d2a9246d2e28ac7e2fec06ee9de836c39b5b8fb5f1 because one of its related images failed to mirror
      2025/12/05 08:21:44  [ERROR]  : [Worker] error mirroring image docker://registry.redhat.io/odf4/odf-csi-addons-operator-bundle@sha256:c88ad4391e2261b72527d14c776733b61c1b33e0e92ffb095fbceaf30b1d88bf error: skipping operator bundle docker://registry.redhat.io/odf4/odf-csi-addons-operator-bundle@sha256:c88ad4391e2261b72527d14c776733b61c1b33e0e92ffb095fbceaf30b1d88bf because one of its related images failed to mirror
      2025/12/05 08:21:44  [INFO]   : 📄 Generating IDMS file...
      2025/12/05 08:21:44  [INFO]   : platform/mirror/working-dir/cluster-resources/idms-oc-mirror.yaml file created
      2025/12/05 08:21:44  [INFO]   : 📄 Generating ITMS file...
      2025/12/05 08:21:44  [INFO]   : platform/mirror/working-dir/cluster-resources/itms-oc-mirror.yaml file created
      2025/12/05 08:21:44  [INFO]   : 📄 Generating CatalogSource file...
      2025/12/05 08:21:44  [INFO]   : platform/mirror/working-dir/cluster-resources/cs-redhat-operator-index-v4-19.yaml file created
      2025/12/05 08:21:44  [INFO]   : 📄 Generating ClusterCatalog file...
      2025/12/05 08:21:44  [INFO]   : platform/mirror/working-dir/cluster-resources/cc-redhat-operator-index-v4-19.yaml file created
      2025/12/05 08:21:44  [INFO]   : mirror time     : 4m10.231946558s
      2025/12/05 08:21:44  [INFO]   : 👋 Goodbye, thank you for using oc-mirror
      2025/12/05 08:21:44  [ERROR]  : [Executor] [Worker] some errors occurred during the mirroring.
               Please review platform/mirror/working-dir/logs/mirroring_errors_20251205_081733.txt for a list of mirroring errors.
               You may consider:
               * removing images or operators that cause the error from the image set config, and retrying
               * keeping the image set config (images are mandatory for you), and retrying
               * mirroring the failing images manually, if retries also fail.
      

      Expected results:

          

      Additional info:

          

              rh-ee-aguidi Alex Guidi
              skoksal@redhat.com Sarp Koksal
              None
              None
              Nidan Gavali Nidan Gavali
              None
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: