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

oc-mirror is not respecting --max-nested-paths while rendering catalog image

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 4.13, 4.12, 4.14, 4.15, 4.16
    • oc-mirror
    • Moderate
    • None
    • False
    • Hide

      None

      Show
      None

      Description of problem:

          oc-mirror is not respecting --max-nested-paths while rendering catalog image

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

         all versions

      How reproducible:

      Follow below steps    

      Steps to Reproduce:

          1. Download any version of oc-mirror, here i am using 4.12
      
             
      ./oc-mirror version
      
      Client Version: version.Info{Major:"", Minor:"", GitVersion:"4.12.0-202305311015.p0.g3ac49d9.assembly.stream-3ac49d9", GitCommit:"3ac49d9bd7c2193ede794e328dfa1142d7735f2e", GitTreeState:"clean", BuildDate:"2023-05-31T10:56:52Z", GoVersion:"go1.19.9", Compiler:"gc", Platform:"linux/amd64"}
      
      
          2. Create any imageset for operator mirroring, example below.
      
      ~~~
      kind: ImageSetConfiguration
      apiVersion: mirror.openshift.io/v1alpha2
      storageConfig:
        registry:
          imageURL: mirror:8443/mirror/oc-mirror-abhijith2
          skipTLS: false
      mirror:
        operators:
          - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.12
            packages:
            - name: local-storage-operator
              channels:
              - name: stable
       ~~~
      
          3. Try to mirror the operators using --max-nested-paths = 2, this means one extra repo then image name.
      
      ~~~
      # /oc-mirror --config=imageset.yaml docker://mirror:8443/osc --max-nested-paths 2
      ~~~     
      
          4. Look at the mapping.txt, the --max-nested-paths is correctly working for all images except catalog image.
      
      ~~~
      registry.redhat.io/openshift4/ose-local-storage-operator@sha256:daeb0d5dcd749e3c2aac20f61af5831dedc3b5d7527c8c28b10395146e27eeec=mirror:8443/osc/openshift4-ose-local-storage-operator:682e2ed2
      registry.redhat.io/openshift4/ose-local-storage-operator-bundle@sha256:4af5be4b23385b758c738aee9641e4ddefc42bf5365a2ad0e796e479eced3529=mirror:8443/osc/openshift4-ose-local-storage-operator-bundle:2fd040e
      registry.redhat.io/openshift4/ose-kube-rbac-proxy@sha256:f4381aaf002b761a2ba614332a2af973f4de5f6a4c84dd96b8808725e561fa89=mirror:8443/osc/openshift4-ose-kube-rbac-proxy:f0af4bec
      registry.redhat.io/openshift4/ose-local-storage-diskmaker@sha256:c29078361747ae0738adff686fb25419b2e856533745e7dd9a6bf5273313e339=mirror:8443/osc/openshift4-ose-local-storage-diskmaker:fab152ec
      
      registry.redhat.io/redhat/redhat-operator-index:v4.14=mirror:8443/osc/redhat/redhat-operator-index:v4.14  ---> instead of one child repo it has two (osc and redhat) while others are only having one ie, osc
      
      
      registry.redhat.io/openshift4/ose-local-storage-mustgather-rhel8@sha256:373268cb912f9e1cb073ad4717f3ae647129884adacbee361398f26afc7cdf06=mirror:8443/osc/openshift4-ose-local-storage-mustgather-rhel8:d7052b9e
      ~~~

      Actual results:

      Catalog image is not respecting --max-nested-paths

      Expected results:

       catalog image also should respect --max-nested-paths

      Additional info:

          

              luzuccar@redhat.com Luigi Mario Zuccarelli
              rhn-support-amuhamme MUHAMMED ASLAM V K
              ying zhou ying zhou
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: