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

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

XMLWordPrintable

    • No
    • CLID Sprint 254
    • 1
    • Rejected
    • False
    • Hide

      None

      Show
      None
    • Hide
      Previously, when mirroring operator images with incompatible semantic versioning, `oc-mirror plugin v2` would fail and exit. This fix ensures that a warning appears in the console, indicating the skipped image and allowing the mirroring process to continue without interruption.

      (link:https://issues.redhat.com/browse/OCPBUGS-34587[*OCPBUGS-34587*])
      Show
      Previously, when mirroring operator images with incompatible semantic versioning, `oc-mirror plugin v2` would fail and exit. This fix ensures that a warning appears in the console, indicating the skipped image and allowing the mirroring process to continue without interruption. (link: https://issues.redhat.com/browse/OCPBUGS-34587 [* OCPBUGS-34587 *])
    • Bug Fix
    • Done

      This is a clone of issue OCPBUGS-33081. The following is the description of the original issue:

      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
              openshift-crt-jira-prow OpenShift Prow Bot
              Rama Kasturi Narra Rama Kasturi Narra
              Subhashini T K Subhashini T K
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: