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

oc mirror - ansible fatal error - rendered catalog is invalid

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 4.14
    • oc-mirror
    • Moderate
    • No
    • False
    • Hide

      None

      Show
      None

      Description of problem: Config file for operator ansible-automation-platform-operator appears to be defined correctly, only lacking a maxVersion, throws an ansible fatal error preventing a manifest from being generated.


      TASK [mirror : Create image mapping for operators (1.5.4 +)] ******************************************************************************************
      fatal: [localhost]: FAILED! =>

      {"changed": true, "cmd": "/home/corona/ws-image-mirror/run_cache/bin/4.14/oc-mirror --config imagesetconfig.yaml file:// --dry-run\n", "delta": "0:00:05.484412", "end": "2024-04-29 14:05:38.039947", "msg": "non-zero return code", "rc": 1, "start": "2024-04-29 14:05:32.555535", "stderr": "\nThe rendered catalog is invalid.\n\nRun \"oc-mirror list operators --catalog CATALOG-NAME --package PACKAGE-NAME\" for more information.\n\nerror: Operator ansible-automation-platform-operator was not found, please check name, minVersion, maxVersion, and channels in the config file.", "stderr_lines": ["", "The rendered catalog is invalid.", "", "Run \"oc-mirror list operators --catalog CATALOG-NAME --package PACKAGE-NAME\" for more information.", "", "error: Operator ansible-automation-platform-operator was not found, please check name, minVersion, maxVersion, and channels in the config file."], "stdout": "Logging to .oc-mirror.log\nCreating directory: oc-mirror-workspace/src/publish\nCreating directory: oc-mirror-workspace/src/v2\nCreating directory: oc-mirror-workspace/src/charts\nCreating directory: oc-mirror-workspace/src/release-signatures\nNo metadata detected, creating new workspace", "stdout_lines": ["Logging to .oc-mirror.log", "Creating directory: oc-mirror-workspace/src/publish", "Creating directory: oc-mirror-workspace/src/v2", "Creating directory: oc-mirror-workspace/src/charts", "Creating directory: oc-mirror-workspace/src/release-signatures", "No metadata detected, creating new workspace"]}

      PLAY RECAP ********************************************************************************************************************************************
      localhost : ok=46 changed=9 unreachable=0 failed=1 skipped=92 rescued=0 ignored=0

          Version-Release number of selected component (if applicable): 
          
      NAME                                  DISPLAY NAME                 DEFAULT CHANNEL
      ansible-automation-platform-operator  Ansible Automation Platform  stable-2.4-cluster-scoped
      
      PACKAGE                               CHANNEL                    HEAD
      ansible-automation-platform-operator  stable-2.4                 aap-operator.v2.4.0-0.1708974895
      ansible-automation-platform-operator  stable-2.4-cluster-scoped  aap-operator.v2.4.0-0.1708975279
      
      Openshift 4.14
      
          How reproducible: Easy
          

      Steps to Reproduce:

          1. Install ansible-automation-operator
          2. Define imagesetconfig.yaml
      
      $ cat run_cache/imagesetconfig.yaml
      kind: ImageSetConfiguration
      apiVersion: mirror.openshift.io/v1alpha2
      storageConfig:
        local:
          path: ./
      mirror:
        operators:
        - catalog: wsartifactory.ws.vici.verizon.com/ws_platform_docker/catalogs/webscale-operator-index:1.6.2-0
          packages:
          - name: sriov-network-operator
            minVersion: '4.14.0'
          - name: numaresources-operator
            minVersion: '4.14.1'
          - name: kubevirt-hyperconverged
            minVersion: '4.14.0'
          - name: elasticsearch-operator
            minVersion: '5.8.3'
          - name: cluster-logging
            minVersion: '5.8.3'
          - name: file-integrity-operator
            minVersion: '1.3.3'
          - name: nfd
            minVersion: '4.14.0'
          - name: ansible-automation-platform-operator
            minVersion: '2.4.0'
          - name: redhat-oadp-operator
            minVersion: '1.3.0'
          - name: kubernetes-nmstate-operator
            minVersion: '4.14.0'
          - name: compliance-operator
            minVersion: '1.4.0'
          - name: openshift-custom-metrics-autoscaler-operator
            minVersion: '2.11.2'
          - name: openshift-pipelines-operator-rh
            minVersion: '1.12.2'
          - name: power-monitoring-operator
            minVersion: '0.1.0'
          - name: tawon-operator
            minVersion: '2.32.0'
      
      ---------------
      -----------------------------------------------------------------------------------------------------------------
      [corona@ws-production-tools ws-image-mirror]$ ./run_cache/bin/4.14/opm render wsartifactory.ws.vici.verizon.com/ws_platform_docker/catalogs/webscale-operator-index:1.6.2-0 > versions.json
      -----------------------------------------------------------------------------------------------------------------
          "name": "ansible-automation-platform-operator",
          "defaultChannel": "stable-2.4-cluster-scoped",
      -
          "schema": "olm.channel",
          "name": "stable-2.4-cluster-scoped",
          "package": "ansible-automation-platform-operator",
          "entries": [
              {
                  "name": "aap-operator.v2.4.0-0.1702352614",
                  "skipRange": ">=2.0.1-0.1635283332 <2.4.1"
              },
              {
                  "name": "aap-operator.v2.4.0-0.1707507304",
                  "replaces": "aap-operator.v2.4.0-0.1702352614",
                  "skipRange": ">=2.0.1-0.1635283332 <2.4.1"
              },
              {
                  "name": "aap-operator.v2.4.0-0.1708975279",
                  "replaces": "aap-operator.v2.4.0-0.1707507304",
                  "skipRange": ">=2.0.1-0.1635283332 <2.4.1"
              }
          ]
      }
      
          3.  Run ansible playbook

      Actual results: Playbook fails with the following fatal error;

      TASK [mirror : Create image mapping for operators (1.5.4 +)] ******************************************************************************************
      fatal: [localhost]: FAILED! =>

      {"changed": true, "cmd": "/home/corona/ws-image-mirror/run_cache/bin/4.14/oc-mirror --config imagesetconfig.yaml file:// --dry-run\n", "delta": "0:00:05.484412", "end": "2024-04-29 14:05:38.039947", "msg": "non-zero return code", "rc": 1, "start": "2024-04-29 14:05:32.555535", "stderr": "\nThe rendered catalog is invalid.\n\nRun \"oc-mirror list operators --catalog CATALOG-NAME --package PACKAGE-NAME\" for more information.\n\nerror: Operator ansible-automation-platform-operator was not found, please check name, minVersion, maxVersion, and channels in the config file.", "stderr_lines": ["", "The rendered catalog is invalid.", "", "Run \"oc-mirror list operators --catalog CATALOG-NAME --package PACKAGE-NAME\" for more information.", "", "error: Operator ansible-automation-platform-operator was not found, please check name, minVersion, maxVersion, and channels in the config file."], "stdout": "Logging to .oc-mirror.log\nCreating directory: oc-mirror-workspace/src/publish\nCreating directory: oc-mirror-workspace/src/v2\nCreating directory: oc-mirror-workspace/src/charts\nCreating directory: oc-mirror-workspace/src/release-signatures\nNo metadata detected, creating new workspace", "stdout_lines": ["Logging to .oc-mirror.log", "Creating directory: oc-mirror-workspace/src/publish", "Creating directory: oc-mirror-workspace/src/v2", "Creating directory: oc-mirror-workspace/src/charts", "Creating directory: oc-mirror-workspace/src/release-signatures", "No metadata detected, creating new workspace"]}

      PLAY RECAP ********************************************************************************************************************************************
      localhost : ok=46 changed=9 unreachable=0 failed=1 skipped=92 rescued=0 ignored=0

          Expected results: Manifest generated, ansible playbook completes successfully.

      Additional info: maxVersion is not explicity defined, minVersion is

       

              luzuccar@redhat.com Luigi Mario Zuccarelli
              dacarpen@redhat.com Darren Carpenter
              ying zhou ying zhou
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: