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

oc-mirror throwing "error: error writing metadata"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Normal Normal
    • None
    • 4.16.z
    • oc-mirror
    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • Moderate
    • None
    • None
    • None
    • None
    • CLID Sprint 267, CLID Sprint 268
    • 2
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description of problem:

      Mirroring successfully done but at the last oc-mirror throws error:
      ~~~
      info: Mirroring completed in 350ms (0B/s)
      Rendering catalog image "my.mirror-registry.com/ocp-oc-mirror-operators-test/redhat/redhat-operator-index:v4.14" with file-based catalog
      Writing image mapping to oc-mirror-workspace/results-1733748357/mapping.txt
      Writing CatalogSource manifests to oc-mirror-workspace/results-1733748357
      Writing ICSP manifests to oc-mirror-workspace/results-1733748357
      error: error writing metadata: POST https://my.mirror-registry.com/v2/ocp-oc-mirror-operators-test-metadata/blobs/uploads/: : Not Found
      ~~~

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

      $ /usr/local/bin/oc-mirror version
      Client Version: version.Info{Major:"", Minor:"", GitVersion:"4.16.0-202411251535.p0.g819f011.assembly.stream.el9-819f011", GitCommit:"819f0115e4be3f55ed7d4edae1c38035811771ae", GitTreeState:"clean", BuildDate:"2024-11-25T18:05:34Z", GoVersion:"go1.21.13 (Red Hat 1.21.13-3.module+el8.10.0+22345+acdd8d0e) X:strictfipsruntime", Compiler:"gc", Platform:"linux/amd64"} 

      How reproducible:

          

      Steps to Reproduce:

      1. Create a imageset config file:
      ~~~
      ]$ cat imageset-config.yaml
      kind: ImageSetConfiguration
      apiVersion: mirror.openshift.io/v1alpha2
      storageConfig:
        registry:
          imageURL: my.mirror-registry.com/ocp-oc-mirror-operators-test-metadata
          skipTLS: false
      mirror:
        operators:
      # 4.14 Catalogs
        - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.14
          packages:
            - name: metallb-operator
              channels:
                - name: stable
                  minVersion: 4.14.0-202407091409
      ~~~
      
      
      2. Perform mirroring:
      ~~~
      $ /usr/local/bin/oc-mirror --rebuild-catalogs  --verbose 0 --max-per-registry 8 --config=/home/user1/imageset-config.yaml docker://my.mirror-registry.com/ocp-oc-mirror-operators-test-metadata
      Checking push permissions for my.mirror-registry.com
      Found: oc-mirror-workspace/src/publish
      Found: oc-mirror-workspace/src/v2
      Creating directory: oc-mirror-workspace/src/charts
      Creating directory: oc-mirror-workspace/src/release-signatures
      No metadata detected, creating new workspace
      wrote mirroring manifests to oc-mirror-workspace/operators.1732788108/manifests-redhat-operator-index
      ...
      ...
      info: Mirroring completed in 350ms (0B/s) 
      Rendering catalog image "my.mirror-registry.com/ocp-oc-mirror-operators-test/redhat/redhat-operator-index:v4.14" with file-based catalog 
      Writing image mapping to oc-mirror-workspace/results-1733748357/mapping.txt Writing CatalogSource manifests to oc-mirror-workspace/results-1733748357 Writing ICSP manifests to oc-mirror-workspace/results-1733748357
      error: error writing metadata: POST https://my.mirror-registry.com/v2/ocp-oc-mirror-operators-test-metadata/blobs/uploads/: : Not Found
      ~~~
      
      - Mirroring got completed but at last it throws "error: error writing metadata:...."
      
      - Even after changing the repository name, oc-mirror throws the same error.
      
      - Skipping "storageConfig:" from imagesetConfig file does not show this error.

      Actual results:

      oc-mirror is throwing "error: error writing metadata..."

      Expected results:

      If mirroring got completed then oc-mirror should be able write metadata successully without any error.

      Additional info:

          

              luzuccar@redhat.com Luigi Mario Zuccarelli
              rhn-support-duge Dushyant Uge
              Dushyant Uge
              None
              Ying Zhou Ying Zhou
              None
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: