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

[v2] d2m fails when invalid package is found in the ImageSetConfiguration

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 4.19.0
    • oc-mirror
    • None
    • CLID Sprint 268
    • 1
    • False
    • Hide

      None

      Show
      None
    • Hide
      Before this bug fix was possible to mirror an empty catalog during mirror to disk (m2d) which would cause disk to mirror (d2m) to fail.

      This bug fix prevents mirroring empty catalogs when an invalid operator is requested in the ImageSetConfiguration.
      Show
      Before this bug fix was possible to mirror an empty catalog during mirror to disk (m2d) which would cause disk to mirror (d2m) to fail. This bug fix prevents mirroring empty catalogs when an invalid operator is requested in the ImageSetConfiguration.
    • Bug Fix
    • In Progress

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

      Description of problem:

      When an invalid packages are included in the ImageSetConfiguration and the operator catalog becomes without any valid package, d2m fails. The operator catalog image should be skipped in case no operators were found for that operator catalog.

      With the following ImageSetConfiguration:

      kind: ImageSetConfiguration
      apiVersion: mirror.openshift.io/v2alpha1
      mirror:
        operators:
          - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.17
            packages:
             - name: netscaler-operator 
      1. m2d
         ./bin/oc-mirror -c ./alex-tests/alex-isc/pr-1093.yaml file://alex-tests/pr-1093 --v2 

      2. I removed the working-dir under the folder pr-1093 and the oc-mirror cache to simulate a d2m from scratch on a disconnected environment where I only have the tarball

          rm -rf ~/.oc-mirror/ && rm -rf ./alex-tests/pr-1093/working-dir

      3. d2m

          ./bin/oc-mirror -c ./alex-tests/alex-isc/pr-1093.yaml --from file://alex-tests/pr-1093 docker://localhost:6000 --dest-tls-verify=false --v2

      Actual results:

          ./bin/oc-mirror -c ./alex-tests/alex-isc/pr-1093.yaml --from file://alex-tests/pr-1093 docker://localhost:6000 --dest-tls-verify=false --v2
      
      2025/03/07 12:29:46  [INFO]   : :wave: Hello, welcome to oc-mirror
      2025/03/07 12:29:46  [INFO]   : :gear:  setting up the environment for you...
      2025/03/07 12:29:46  [INFO]   : :twisted_rightwards_arrows: workflow mode: diskToMirror 
      2025/03/07 12:30:11  [INFO]   : 🕵  going to discover the necessary images...
      2025/03/07 12:30:11  [INFO]   : :mag: collecting release images...
      2025/03/07 12:30:11  [INFO]   : :mag: collecting operator images...
      2025/03/07 12:30:11  [ERROR]  : [OperatorImageCollector] stat .: no such file or directory
       ✗   () Collecting catalog registry.redhat.io/redhat/redhat-operator-index:v4.17 
      2025/03/07 12:30:11  [INFO]   : :wave: Goodbye, thank you for using oc-mirror
      2025/03/07 12:30:11  [ERROR]  : stat .: no such file or directory

      Expected results:

      m2d should should fail when there is no related images found for the specified catalog (invalid operator netscaler-operator for the ImageSetConfiguration used above)

      Additional info:

          

              rh-ee-aguidi Alex Guidi
              openshift-crt-jira-prow OpenShift Prow Bot
              Ying Zhou Ying Zhou
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: