Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1820653

Summary: Package server fail to read the custom CatalogSource due to "no such column: api_provider.operatorbundle_name"
Product: OpenShift Container Platform Reporter: Alexander Greene <agreene>
Component: OLMAssignee: Evan Cordell <ecordell>
OLM sub component: OLM QA Contact: Jian Zhang <jiazha>
Status: CLOSED DUPLICATE Docs Contact:
Severity: unspecified    
Priority: unspecified    
Version: 4.5   
Target Milestone: ---   
Target Release: 4.4.0   
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: 2020-04-06 13:53:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Alexander Greene 2020-04-03 14:19:02 UTC
This bug was initially created as a copy of Bug #1820419

I am copying this bug because: 
I want to confirm the the addition of the `api_provider.operatorbundle_name` column didn't break anything on OpenShift 4.5.


Description of problem:
No packagemanifest generated when using a custom CatalogSource image. Error logs: 
time="2020-04-03T02:25:01Z" level=warning msg="error getting bundle, eliding channel" action="refresh cache" channel=4.4 error="rpc error: code = Unknown desc = no such column: api_provider.operatorbundle_name" source="{qe-app-registry openshift-marketplace}"


Version-Release number of selected component (if applicable):
Cluster version is 4.4.0-0.nightly-2020-04-02-130551
mac:~ jianzhang$ oc exec catalog-operator-f575d4c6b-swvjh -- olm --version
OLM version: 0.14.2
git commit: 3f7675c6867e4d43c99eb8138cfb5fc686a37b3b

How reproducible:
always

Steps to Reproduce:
1. Create a CatalogSource, as follow:
mac:~ jianzhang$ cat cs-qe.yaml 
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  name: qe-app-registry
  namespace: openshift-marketplace
spec:
  displayName: QE Operators
  image: quay.io/openshift-qe-optional-operators/qe-operators-registry:latest-20200402
  publisher: QE
  sourceType: grpc

mac:~ jianzhang$ oc get catalogsource -n openshift-marketplace
NAME                  DISPLAY               TYPE   PUBLISHER   AGE
certified-operators   Certified Operators   grpc   Red Hat     8h
community-operators   Community Operators   grpc   Red Hat     8h
qe-app-registry       QE Operators          grpc   QE          7h57m
redhat-marketplace    Red Hat Marketplace   grpc   Red Hat     8h
redhat-operators      Red Hat Operators     grpc   Red Hat     7h53m
mac:~ jianzhang$ oc get pods
NAME                                   READY   STATUS    RESTARTS   AGE
certified-operators-857cd5cd46-n54cs   1/1     Running   0          6h57m
community-operators-7c59bb6dc9-bhbxq   1/1     Running   0          7h58m
marketplace-operator-9c57fd757-l6bv5   1/1     Running   0          7h59m
qe-app-registry-sbx4z                  1/1     Running   0          60m
redhat-marketplace-656978459-fxqfr     1/1     Running   0          6h57m
redhat-operators-68cdc45d46-664qg      1/1     Running   0          7h54m

2. Check if the c generated.

Actual results:
No responding Packamnigest generated.
mac:~ jianzhang$ oc get packagemanifest |grep -i qe
mac:~ jianzhang$ 


Expected results:
The customize Packmanifest should be displayed successfully.

Additional info:
Debug progress:

1, check the logs of the Packageserver, got:
mac:~ jianzhang$ oc logs deployment/packageserver 
Found 2 pods, using pod/packageserver-845f456869-btsb4
...
I0403 00:04:17.720147       1 balancer_conn_wrappers.go:127] pickfirstBalancer: HandleSubConnStateChange: 0xc00035a000, READY
time="2020-04-03T00:04:17Z" level=warning msg="error getting bundle, eliding channel" action="refresh cache" channel=4.2 error="rpc error: code = Unknown desc = no such column: api_provider.operatorbundle_name" source="{qe-app-registry openshift-marketplace}"
time="2020-04-03T00:04:17Z" level=warning msg="error getting bundle, eliding channel" action="refresh cache" channel=4.2 error="rpc error: code = Unknown desc = no such column: api_provider.operatorbundle_name" source="{qe-app-registry openshift-marketplace}"
...

2, Check if this customizes CatalogSource serves well. It serves well.
mac:~ jianzhang$ oc port-forward qe-app-registry-sbx4z  50051
Forwarding from 127.0.0.1:50051 -> 50051
Forwarding from [::1]:50051 -> 50051
Handling connection for 50051
...
mac:~ jianzhang$ grpcurl -plaintext  localhost:50051 api.Registry/ListPackages
{
  "name": "cluster-kube-descheduler-operator"
}
{
  "name": "cluster-logging"
}
{
  "name": "clusterresourceoverride"
}
{
  "name": "elasticsearch-operator"
}
{
  "name": "local-storage-operator"
}
{
  "name": "metering-ocp"
}
{
  "name": "nfd"
}
{
  "name": "openshiftansibleservicebroker"
}
{
  "name": "openshifttemplateservicebroker"
}
{
  "name": "ptp-operator"
}
{
  "name": "sriov-network-operator"
}

3, Check its database. It doesn't have the "api_provider.operatorbundle_name" column.
mac:~ jianzhang$ oc rsh qe-app-registry-sbx4z   
sh-4.2$ sqlite3 /bundles.db
SQLite version 3.7.17 2013-05-20 00:56:22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .header on
sqlite> .mode column
sqlite> .table
api                channel            package          
api_provider       channel_entry      related_image    
api_requirer       operatorbundle     schema_migrations
sqlite> select * from api_provider;
group_name           version     kind        channel_entry_id
-------------------  ----------  ----------  ----------------
automationbroker.io  v1alpha1    Bundle      28              
automationbroker.io  v1alpha1    Bundle      29 

Seems like something wrong in the provider of the Packageserver.

Comment 1 Evan Cordell 2020-04-06 13:53:15 UTC

*** This bug has been marked as a duplicate of bug 1820419 ***