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

Oc-mirror get the wrong index.json and failed when ImageSetConfig containing OCI FBC

    XMLWordPrintable

Details

    • Important
    • CLID Sprint 251
    • 1
    • Rejected
    • False
    • Hide

      None

      Show
      None
    • N/A
    • Release Note Not Required
    • In Progress
    • Customer Facing

    Description

      Description of problem:

      Oc-mirror get the wrong index.json and failed when ImageSetConfig containing OCI FBC

       

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

      oc-mirror version 
      WARNING: This version information is deprecated and will be replaced with the output from --short. Use --output=yaml|json to get the full version.
      Client Version: version.Info{Major:"", Minor:"", GitVersion:"4.16.0-202403070215.p0.gc4f8295.assembly.stream.el9-c4f8295", GitCommit:"c4f829512107f7d0f52a057cd429de2030b9b3b3", GitTreeState:"clean", BuildDate:"2024-03-07T03:46:24Z", GoVersion:"go1.21.7 (Red Hat 1.21.7-1.el9) X:strictfipsruntime", Compiler:"gc", Platform:"linux/amd64"}

      How reproducible:

      always

      Steps to Reproduce:

      1)  Copy the operator as OCI format to localhost:
      `skopeo copy docker://registry.redhat.io/redhat/redhat-operator-index:v4.12 oci:///app1/noo/redhat-operator-index  --remove-signatures`
      
      2)  Use following imagesetconfigure for mirror:
      cat config-oci.yaml
      apiVersion: mirror.openshift.io/v1alpha2
      kind: ImageSetConfiguration
      storageConfig:
        registry:
          imageURL: registryhost:5000/metadata:latest
      mirror:
        additionalImages:
         - name: quay.io/openshifttest/bench-army-knife@sha256:078db36d45ce0ece589e58e8de97ac1188695ac155bc668345558a8dd77059f6
        platform:
          channels:
          - name: stable-4.12
            type: ocp
          graph: true
        operators:
          - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.12
            packages:
             - name: elasticsearch-operator
          - catalog: oci:///app1/noo/redhat-operator-index
            packages:
              - name: cluster-kube-descheduler-operator
              - name: odf-operator
      
      `oc-mirror --config config-oci.yaml file://outoci --v2`
      
      
      

      Actual results: 

      2) In the configuration we are use oci:///app1/noo/redhat-operator-index, so should not to check index.json under outoci/working-dir/operator-images/redhat-operator-index/index.json
      
       oc-mirror --config config-oci.yaml file://outoci --v2
      --v2 flag identified, flow redirected to the oc-mirror v2 version. PLEASE DO NOT USE that. V2 is still under development and it is not ready to be used. 
      2024/03/25 06:23:06  [INFO]   : mode mirrorToDisk
      2024/03/25 06:23:06  [INFO]   : local storage registry will log to /app1/0321/outoci/working-dir/logs/registry.log
      2024/03/25 06:23:06  [INFO]   : starting local storage on localhost:55000
      2024/03/25 06:23:06  [INFO]   : detected minimum version as 4.12.53
      2024/03/25 06:23:06  [INFO]   : detected minimum version as 4.12.53
      2024/03/25 06:23:07  [INFO]   : Found update 4.12.53
      2024/03/25 06:23:07  [INFO]   : signature b584f5458fb946115b0cf0f1793dc9224c5e6a4567e74018f0590805a03eb523
      2024/03/25 06:23:07  [WARN]   : signature for b584f5458fb946115b0cf0f1793dc9224c5e6a4567e74018f0590805a03eb523 not in cache
      2024/03/25 06:23:07  [INFO]   : content {"critical": {"image": {"docker-manifest-digest": "sha256:b584f5458fb946115b0cf0f1793dc9224c5e6a4567e74018f0590805a03eb523"}, "type": "atomic container signature", "identity": {"docker-reference": "quay.io/openshift-release-dev/ocp-release:4.12.53-x86_64"}}, "optional": {"creator": "Red Hat OpenShift Signing Authority 0.0.1"}}
      2024/03/25 06:23:07  [INFO]   : image found : quay.io/openshift-release-dev/ocp-release:4.12.53-x86_64
      2024/03/25 06:23:07  [INFO]   : public Key : 567E347AD0044ADE55BA8A5F199E2F91FD431D51
      2024/03/25 06:23:07  [INFO]   : copying  quay.io/openshift-release-dev/ocp-release:4.12.53-x86_64
      2024/03/25 06:23:12  [INFO]   : copying  cincinnati response to outoci/working-dir/release-filters
      2024/03/25 06:23:12  [INFO]   : creating graph data image
      2024/03/25 06:23:15  [INFO]   : graph image created and pushed to cache.
      2024/03/25 06:23:15  [INFO]   : total release images to copy 185
      2024/03/25 06:23:15  [INFO]   : copying operator image registry.redhat.io/redhat/redhat-operator-index:v4.12
      2024/03/25 06:23:18  [INFO]   : manifest 7b9891532a76194c1b18698518abad9be4aca7f1152ac73f450aa8bfadef538f
      2024/03/25 06:23:18  [INFO]   : label /configs
      2024/03/25 06:23:36  [INFO]   : copying operator image oci:///app1/noo/redhat-operator-index
      error closing log file registry.log: close outoci/working-dir/logs/registry.log: file already closed
      2024/03/25 06:23:36  [ERROR]  : open outoci/working-dir/operator-images/redhat-operator-index/index.json: no such file or directory

      Expected results:

      2) oc-mirror find correct path for index.json and not fail

      Attachments

        Issue Links

          Activity

            People

              rh-ee-aguidi Alex Guidi
              yinzhou@redhat.com ying zhou
              ying zhou ying zhou
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: