Uploaded image for project: 'AMQ Streams'
  1. AMQ Streams
  2. ENTMQST-4230

AMQ Streams S390x csv includes replaces statement references to non-existent s390x bundles

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • 2.1.0.GA
    • None
    • False
    • None
    • False

      AMQ Streams S390x csv includes replaces statement references to non-existent s390x bundles

      1) The catalog index is obtained using the following (run on s390x) and then a tool is used to look through the resulting index.db

      #!/bin/bash
      
      podman run -d --name catalog registry.redhat.io/redhat/redhat-operator-index:v4.9
      podman cp catalog:/database/index.db .
      podman stop catalog
      podman rm catalog
      dir index.db
      
      

      2) The related s390x bundle sequence from the catalog looks like this

      Operator Bundle

      name                     version       replaces               skiprange               
      ----                     -------       --------               ---------               
      amqstreams.v1.7.3        1.7.3         amqstreams.v1.7.2
      amqstreams.v1.8.0        1.8.0         amqstreams.v1.7.3
      amqstreams.v1.8.1        1.8.1         amqstreams.v1.8.0
      amqstreams.v1.8.2        1.8.2         amqstreams.v1.8.1
      amqstreams.v1.8.3        1.8.3         amqstreams.v1.8.2
      amqstreams.v1.8.4        1.8.4         amqstreams.v1.8.3
      amqstreams.v2.0.0-0      2.0.0-0       amqstreams.v1.8.4      >=1.8.0 <2.0.0-0
      amqstreams.v2.0.1-0      2.0.1-0       amqstreams.v2.0.0-0    >=1.8.0 <2.0.1-0      <<< 2.0.1-0 then replaces 2.0.0-0
      
      amqstreams.v2.0.1-1      2.0.1-1       amqstreams.v2.0.1-0    >=1.8.0 <2.0.1-1
      amqstreams.v2.0.1-2      2.0.1-2       amqstreams.v2.0.1-1    >=1.8.0 <2.0.1-2
      amqstreams.v2.0.1-3      2.0.1-3       amqstreams.v2.0.1-2    >=1.8.0 <2.0.1-3
      
      amqstreams.v2.1.0-0      2.1.0-0       amqstreams.v2.0.1-0    >=2.0.0-0 <2.1.0-0     <<<<<  This one replaces 2.0.1.0
      amqstreams.v2.1.0-1      2.1.0-1       amqstreams.v2.1.0-0    >=2.0.0-0 <2.1.0-1
      amqstreams.v2.1.0-2      2.1.0-2       amqstreams.v2.1.0-1    >=2.0.0-0 <2.1.0-2
      amqstreams.v2.1.0-3      2.1.0-3       amqstreams.v2.1.0-2    >=2.0.0-0 <2.1.0-3
      amqstreams.v2.1.0-4      2.1.0-4       amqstreams.v2.1.0-3    >=2.0.0-0 <2.1.0-4
      

      3) In order to build a catalog it's required that all bundles referenced in replaces statements also be included in the catalog.

      The bundle registry.redhat.io/amq7/amq-streams-operator-bundle:2.0.1-0 doesn't exist
      (one error is that csv for 2.1.0-0 has a replaces statement and points to it)

      Prior to 2.0.1-0 only had support for amd64 - for ex 1.8.4 which v2.0.0-0 says it replaces.

      
      docker manifest inspect registry.redhat.io/amq7/amq-streams-operator-bundle:1.8.4
      {
          "schemaVersion": 2,
          "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
          "manifests": [
              {
                  "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
                  "size": 526,
                  "digest": "sha256:ea3342beb9260e19a72df1e683a6dd87e6cd5e888f396d269e62d9c4ef2c814d",
                  "platform": {
                      "architecture": "amd64",
                      "os": "linux"
                  }
              }
          ]
      }
      

      The bundle for 2.0.1-0 doesn't exist
      The bundle for 2.0.1-1 only supports amd64, ppc

      
      docker manifest inspect registry.redhat.io/amq7/amq-streams-operator-bundle:2.0.1-1
      Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
      {
          "schemaVersion": 2,
          "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
          "manifests": [
              {
                  "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
                  "size": 526,
                  "digest": "sha256:01ce4d3f09f11c4e3eb5e1c34dc446a6072b599e2010486e05d4043423cf395f",
                  "platform": {
                      "architecture": "amd64",
                      "os": "linux"
                  }
              },
              {
                  "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
                  "size": 526,
                  "digest": "sha256:cdaa6e1b8fbba2512341484c40918bf33d2f03700e72231408bee20742df3849",
                  "platform": {
                      "architecture": "ppc64le",
                      "os": "linux"
                  }
              }
          ]
      }
      
      

      This results in the following error trying to build the catalog.

      
      NFO[0000] adding to the registry                        bundles="[registry.redhat.io/amq7/amq-streams-operator-bundle@sha256:d7e9d2cd373abfa00060b40a7bf5c9f578b5ee5face126db25d93adc1b63f101]"
      INFO[0000] running /usr/bin/podman pull registry.redhat.io/amq7/amq-streams-operator-bundle@sha256:d7e9d2cd373abfa00060b40a7bf5c9f578b5ee5face126db25d93adc1b63f101  bundles="[registry.redhat.io/amq7/amq-streams-operator-bundle@sha256:d7e9d2cd373abfa00060b40a7bf5c9f578b5ee5face126db25d93adc1b63f101]"
      INFO[0005] running podman create                         bundles="[registry.redhat.io/amq7/amq-streams-operator-bundle@sha256:d7e9d2cd373abfa00060b40a7bf5c9f578b5ee5face126db25d93adc1b63f101]"
      INFO[0007] running podman cp                             bundles="[registry.redhat.io/amq7/amq-streams-operator-bundle@sha256:d7e9d2cd373abfa00060b40a7bf5c9f578b5ee5face126db25d93adc1b63f101]"
      INFO[0008] running podman rm                             bundles="[registry.redhat.io/amq7/amq-streams-operator-bundle@sha256:d7e9d2cd373abfa00060b40a7bf5c9f578b5ee5face126db25d93adc1b63f101]"
      INFO[0009] Could not find optional dependencies file     file=bundle_tmp877854841/metadata load=annotations with=./bundle_tmp877854841
      INFO[0009] Could not find optional properties file       file=bundle_tmp877854841/metadata load=annotations with=./bundle_tmp877854841
      INFO[0009] Could not find optional dependencies file     file=bundle_tmp877854841/metadata load=annotations with=./bundle_tmp877854841
      INFO[0009] Could not find optional properties file       file=bundle_tmp877854841/metadata load=annotations with=./bundle_tmp877854841
      ERRO[0009] permissive mode disabled                      bundles="[registry.redhat.io/amq7/amq-streams-operator-bundle@sha256:d7e9d2cd373abfa00060b40a7bf5c9f578b5ee5face126db25d93adc1b63f101]" error="Invalid bundle amqstreams.v2.1.0-0, replaces nonexistent bundle amqstreams.v2.0.1-0"
      Error: Invalid bundle amqstreams.v2.1.0-0, replaces nonexistent bundle amqstreams.v2.0.1-0
      Usage:
        opm registry add [flags]
      Flags:
        -b, --bundle-images strings   comma separated list of links to bundle image
            --ca-file string          the root certificates to use when --container-tool=none; see docker/podman docs for certificate loading instructions
        -c, --container-tool string   tool to interact with container images (save, build, etc.). One of: [none, docker, podman] (default "none")
        -d, --database string         relative path to database file (default "bundles.db")
            --debug                   enable debug logging
        -h, --help                    help for add
            --mode string             graph update mode that defines how channel graphs are updated. One of: [replaces, semver, semver-skippatch] (default "replaces")
            --permissive              allow registry load errors
      Global Flags:
            --skip-tls   skip TLS certificate verification for container image registries while pulling bundles or index
      Failed to add dependent operator bundle to BAAS OCP s390x catalog.
      

      Basically, the first csv to support s390x should not have a replaces statement pointing to earlier csv versions which don't support s390x.

            Unassigned Unassigned
            rhn-support-kkakarla kodandaRamu kakarla
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: