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

oc-mirror v2 should be able to mirror operators that does not have standard versioning (incompatible with semver)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • 4.16.0
    • 4.16.0
    • oc / oc-mirror
    • No
    • CLID Sprint 253, CLID Sprint 254
    • 2
    • Rejected
    • False
    • Hide

      None

      Show
      None
    • Hide
      Previously, oc-mirror plugin v2 (Technology Preview) would discontinue the mirroring when it found operators using bundle versions that were not compatible with semantic versioning. This issue also prevented the creation of cluster resources such as IDMS, ITMS, and `CatalogSource`. This fix resolves issues related to missing image names and incorrect semantic versioning usage. Now, oc-mirror plugin v2 skips and does not mirror images with these issues. If there is incorrect semantic versioning, the console will display a warning with the relevant image.
      (link:https://issues.redhat.com/browse/OCPBUGS-33081[*OCPBUGS-33081*])
      Show
      Previously, oc-mirror plugin v2 (Technology Preview) would discontinue the mirroring when it found operators using bundle versions that were not compatible with semantic versioning. This issue also prevented the creation of cluster resources such as IDMS, ITMS, and `CatalogSource`. This fix resolves issues related to missing image names and incorrect semantic versioning usage. Now, oc-mirror plugin v2 skips and does not mirror images with these issues. If there is incorrect semantic versioning, the console will display a warning with the relevant image. (link: https://issues.redhat.com/browse/OCPBUGS-33081 [* OCPBUGS-33081 *])
    • Bug Fix
    • Done

      Description of problem:

      When running oc-mirror against yaml that includes community-operator-index the process terminates prematurely

      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-202404221110.p0.g0e2235f.assembly.stream.el9-0e2235f", GitCommit:"0e2235f4a51ce0a2d51cfc87227b1c76bc7220ea", GitTreeState:"clean", BuildDate:"2024-04-22T16:05:56Z", GoVersion:"go1.21.9 (Red Hat 1.21.9-1.el9_4) X:strictfipsruntime", Compiler:"gc", Platform:"linux/amd64"}
      

      How reproducible:

      $ cat imageset-config.yaml 
      apiVersion: mirror.openshift.io/v1alpha2
      kind: ImageSetConfiguration
      archiveSize: 4
      mirror:
        platform:
          channels:
          - name: stable-4.15
            type: ocp
          graph: true
        operators:
        - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.15
          full: false
        - catalog: registry.redhat.io/redhat/certified-operator-index:v4.15
          full: false
        - catalog: registry.redhat.io/redhat/community-operator-index:v4.15
          full: false
        additionalImages:
        - name: registry.redhat.io/ubi8/ubi:latest
        helm: {}
      
      
      $ oc-mirror --v2 -c imageset-config.yaml  --loglevel debug --workspace file:////data/oc-mirror/workdir/ docker://registry.local.momolab.io:8443
      
      
      Last 10 lines:
      
      2024/04/29 06:01:40  [DEBUG]  : source docker://public.ecr.aws/aws-controllers-k8s/apigatewayv2-controller:1.0.7
      2024/04/29 06:01:40  [DEBUG]  : destination docker://registry.local.momolab.io:8443/aws-controllers-k8s/apigatewayv2-controller:1.0.7
      2024/04/29 06:01:40  [DEBUG]  : source docker://quay.io/openshift-community-operators/ack-apigatewayv2-controller@sha256:c6844909fa2fdf8aabf1c6762a2871d85fb3491e4c349990f46e4cd1e7ecc099
      2024/04/29 06:01:40  [DEBUG]  : destination docker://registry.local.momolab.io:8443/openshift-community-operators/ack-apigatewayv2-controller:c6844909fa2fdf8aabf1c6762a2871d85fb3491e4c349990f46e4cd1e7ecc099
      2024/04/29 06:01:40  [DEBUG]  : source docker://quay.io/openshift-community-operators/openshift-nfd-operator@sha256:880517267f12e0ca4dd9621aa196c901eb1f754e5ec990a1459d0869a8c17451
      2024/04/29 06:01:40  [DEBUG]  : destination docker://registry.local.momolab.io:8443/openshift-community-operators/openshift-nfd-operator:880517267f12e0ca4dd9621aa196c901eb1f754e5ec990a1459d0869a8c17451
      2024/04/29 06:01:40  [DEBUG]  : source docker://quay.io/openshift/origin-cluster-nfd-operator:4.10
      2024/04/29 06:01:40  [DEBUG]  : destination docker://registry.local.momolab.io:8443/openshift/origin-cluster-nfd-operator:4.10
      2024/04/29 06:01:40  [ERROR]  : [OperatorImageCollector] unable to parse image registry.redhat.io/openshift4/ose-kube-rbac-proxy correctly
      2024/04/29 06:01:40  [INFO]   : 👋 Goodbye, thank you for using oc-mirror
      error closing log file registry.log: close /data/oc-mirror/workdir/working-dir/logs/registry.log: file already closed
      2024/04/29 06:01:40  [ERROR]  : unable to parse image registry.redhat.io/openshift4/ose-kube-rbac-proxy correctly 
      

       

      Steps to Reproduce:

          1. Run oc-mirror command as above with debug enabled
          2. Wait a few minutes
          3. oc-mirror fails
          

      Actual results:

          oc-mirror fails when openshift-community-operator is included

      Expected results:

          oc-mirror to complete

      Additional info:

      I have the debug logs, which I can attach.    

            luzuccar@redhat.com Luigi Mario Zuccarelli
            mahmad1@redhat.com Mohammad N T Ahmad
            ying zhou ying zhou
            Subhashini T K Subhashini T K
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: