Bug 2097210

Summary: Failed to install the operator package for 4.8 which is created by oc-mirror
Product: OpenShift Container Platform Reporter: zhou ying <yinzhou>
Component: ocAssignee: Ross Peoples <rpeoples>
oc sub component: oc-mirror QA Contact: zhou ying <yinzhou>
Status: CLOSED INSUFFICIENT_DATA Docs Contact:
Severity: high    
Priority: high CC: Alexandros.Phinikarides, dageoffr, jpower, vdinh
Version: 4.11   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-01-17 11:01:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description zhou ying 2022-06-15 07:15:56 UTC
Description of problem:
Failed to install the operator package for 4.8 which is created by oc-mirror

Version-Release number of selected component (if applicable):
oc-mirror version 
Client Version: version.Info{Major:"", Minor:"", GitVersion:"4.11.0-202206101306.p0.g01d488f.assembly.stream-01d488f", GitCommit:"01d488f6b1cbab2a199f41ee03d143658605184f", GitTreeState:"clean", BuildDate:"2022-06-10T16:58:35Z", GoVersion:"go1.18", Compiler:"gc", Platform:"linux/amd64"}

How reproducible:
always

Steps to Reproduce:
1. Mirror the package to registry :
cat filter-quay.yaml 
apiVersion: mirror.openshift.io/v1alpha2
kind: ImageSetConfiguration
storageConfig:
  registry:
    imageURL: ec2-18-218-162-45.us-east-2.compute.amazonaws.com:5000/logging
    skipTLS: false
mirror:
  operators:
    - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.8
      packages:
        - name: cluster-logging
          channels:
            - name: stable

`oc-mirror --config filter-quay.yaml docker://ec2-18-218-162-45.us-east-2.compute.amazonaws.com:5000`

2. Create CatalogSource and ICSP manifests for the catalog package .


Actual results:
1. mirror succeed;
2. the operator index pod always failed and can't see the operator in the operatorHub:
oc get pods
NAME                                    READY   STATUS             RESTARTS   AGE
marketplace-operator-576594c568-l5ddt   1/1     Running            0          6h26m
redhat-operator-index-vhtbg             0/1     CrashLoopBackOff   56         4h2m

oc debug redhat-operator-index-vhtbg
Starting pod/redhat-operator-index-vhtbg-debug ...
Pod IP: 10.131.0.14
If you don't see a command prompt, try pressing enter.
sh-4.4$ opm serve
Error: unknown command "serve" for "opm"
Run 'opm --help' for usage.
sh-4.4$ opm
CLI to interact with operator-registry and build indexes of operator content

Usage:
  opm [command]

Available Commands:
  help        Help about any command
  index       generate operator index container images
  registry    interact with operator-registry database
  version     Print the opm version

Flags:
  -h, --help       help for opm
      --skip-tls   skip TLS certificate verification for container image registries while pulling bundles or index

sh-4.4$ opm version
Version: version.Version{OpmVersion:"9e9736d6b", GitCommit:"9e9736d6b162b877da9de3b760b06eeeb52ccd18", BuildDate:"2022-05-12T18:00:00Z", GoOs:"linux", GoArch:"amd64"}
sh-4.4$ exit
exit

Expected results:
2. operator index pod works well.

Additional info:

Comment 1 Jennifer Power 2022-06-15 13:55:29 UTC
@yinzhou `oc-mirror` does not support catalogs older than 4.9. The reason for this is that earlier catalogs do not have the ability to read file-based catalogs because they use older versions of the `opm`. That is the error you are seeing; the `opm serve` command renders a file-based catalog.

Comment 2 zhou ying 2022-06-16 06:34:32 UTC
Jennifer Power:

got you , thanks . Then it's better to highlight this in the Doc.

Comment 3 Jennifer Power 2022-06-16 13:36:18 UTC
I will ensure this information makes it into the official 4.11 docs.

Comment 4 Ross Peoples 2022-10-04 16:59:05 UTC
Is this still an issue, or can we close this?

Comment 5 Red Hat Bugzilla 2023-09-18 04:39:16 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days