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

oc-mirror v1 and v2 do not mirror multiple channels for the same operator

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Undefined Undefined
    • None
    • 4.19.0
    • oc-mirror
    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • Critical
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description of problem:

      oc-mirror v1 and v2 do not mirror multiple channels for the same operator   

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

      4.19    

      How reproducible:

      Always    

      Steps to Reproduce:

      1.  Setup an `ImageSetConfiguration` file with the following contents
      
      ```
      mirror:
        operators:
          - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.16
            packages:
              - name: rhbk-operator
                defaultChannel: stable-v22.0
                channels:
                - name: stable-v22.0
                  minVersion: 22.0.9-opr.1
                defaultChannel: stable-v26.0
                channels:
                - name: stable-v26.0
                  minVersion: 26.0.7-opr.1
      ```
      
      2.  Kick off an oc-mirror v1 or v2 job from registry.redhat.io to a local disk location
      
      3.  Mirror the contents from disk to a local Quay registry
      

      Actual results:

      Both oc-mirror v1 and v2 only mirror the second default channel 
      
      ### oc-mirror v1 ###
      
      $ oc-mirror list operators --package rhbk-operator --catalog mirror-dr.syangsao.net:8443/erie/redhat/redhat-operator-index:v4.16
      
      NAME           DISPLAY NAME                        DEFAULT CHANNEL
      rhbk-operator  Red Hat build of Keycloak Operator  stable-v26.0
      
      PACKAGE        CHANNEL       HEAD
      rhbk-operator  stable-v26.0  rhbk-operator.v26.0.7-opr.1
      
      $ oc-mirror list operators --package rhbk-operator --channel stable-v26.0 --catalog mirror-dr.syangsao.net:8443/erie/redhat/redhat-operator-index:v4.16
      
      VERSIONS
      26.0.7-opr.1
      
      Above output for oc-mirror v1 only grabs 1 image version from 1 channel only.
      
      ### oc-mirror v2 ###
      
      $ oc-mirror list operators --package rhbk-operator --catalog mirror-dr.syangsao.net:8443/erie2/redhat/redhat-operator-index:v4.16
      
      NAME           DISPLAY NAME                        DEFAULT CHANNEL
      rhbk-operator  Red Hat build of Keycloak Operator  stable-v26.0
      
      PACKAGE        CHANNEL       HEAD
      rhbk-operator  stable-v26.0  rhbk-operator.v26.0.15-opr.1
      
      $ oc-mirror list operators --package rhbk-operator --channel stable-v26.0 --catalog mirror-dr.syangsao.net:8443/erie2/redhat/redhat-operator-index:v4.16
      
      VERSIONS
      26.0.8-opr.1
      26.0.13-opr.1
      26.0.15-opr.1
      26.0.7-opr.1
      26.0.9-opr.1
      26.0.10-opr.1
      26.0.11-opr.1
      26.0.12-opr.1
      26.0.14-opr.1
      
      Above output for oc-mirror v2 grabs the specified version and above, which is expected behavior, other than not grabbing the images from stable-v22.0.

      Expected results:

      Both options should grab images from the both the `stable-v22.0` and `stable-v26.0` channels that are above the minVersion(s) that are specified in the `ImageSetConfiguration` file   

      Additional info:

      $ oc-mirror version
      
      Client Version: version.Info{Major:"", Minor:"", GitVersion:"4.19.0-202507101307.p0.g9283907.assembly.stream.el9-9283907", GitCommit:"9283907f659b8196cf0a9a45b9c4b0016edb25d5", GitTreeState:"clean", BuildDate:"2025-07-10T13:56:48Z", GoVersion:"go1.23.9 (Red Hat 1.23.9-1.el9_6) X:strictfipsruntime", Compiler:"gc", Platform:"linux/amd64"}

              rdossant Rafael Fonseca dos Santos
              rh-ee-syangsao Sam Yangsao
              None
              None
              Nidan Gavali Nidan Gavali
              None
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: