Bug 1929904

Summary: ClusterServiceVersion property inference does not infer package and version
Product: OpenShift Container Platform Reporter: Vu Dinh <vdinh>
Component: OLMAssignee: Kevin Rizza <krizza>
OLM sub component: OLM QA Contact: kuiwang
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: high CC: bluddy, braander, dlawrenc, ecordell, jiazha, krizza, scuppett, vdinh
Version: 4.6Keywords: Triaged
Target Milestone: ---   
Target Release: 4.7.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1921953 Environment:
Last Closed: 2021-03-25 01:53:01 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:
Bug Depends On: 1921953    
Bug Blocks: 1938618    

Comment 4 kuiwang 2021-03-15 02:46:14 UTC
verify it on 4.7. LGTM
--
[root@preserve-olm-env 1929904]# oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.7.0-0.nightly-2021-03-14-223051   True        False         42m     Cluster version is 4.7.0-0.nightly-2021-03-14-223051
[root@preserve-olm-env 1929904]# oc get pod -n openshift-operator-lifecycle-manager
NAME                                READY   STATUS    RESTARTS   AGE
catalog-operator-5667564f4b-jz4qh   1/1     Running   0          78m
olm-operator-58cdc89b5f-nsqcl       1/1     Running   0          78m
packageserver-686b84954-fzd7j       1/1     Running   0          68m
packageserver-686b84954-xjt8j       1/1     Running   2          68m
[root@preserve-olm-env 1929904]# oc exec  catalog-operator-5667564f4b-jz4qh -n openshift-operator-lifecycle-manager -- olm --version
OLM version: 0.17.0
git commit: ad57dd4ab7254e0cfce6b5f910166f4c247b76d3
[root@preserve-olm-env 1929904]# cat res.yaml 
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  name: ibm-common-service-catalog
  namespace: default
spec:
  image: docker.io/ibmcom/ibm-common-service-catalog:latest
  sourceType: grpc
---
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  name: ibm-operator-catalog
  namespace: default
spec:
  image: docker.io/ibmcom/ibm-operator-catalog:latest
  sourceType: grpc
---
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
  name: test-operator-group
  namespace: default
spec: {}
---
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: test-ibm-common-service-operator
  namespace: default
spec:
  channel: stable-v1
  installPlanApproval: Automatic
  name: ibm-common-service-operator
  source: ibm-common-service-catalog
  sourceNamespace: default

[root@preserve-olm-env 1929904]# kubectl create -f res.yaml
catalogsource.operators.coreos.com/ibm-common-service-catalog created
catalogsource.operators.coreos.com/ibm-operator-catalog created
operatorgroup.operators.coreos.com/test-operator-group created
subscription.operators.coreos.com/test-ibm-common-service-operator created
[root@preserve-olm-env 1929904]# kubectl get csv
No resources found in default namespace.
[root@preserve-olm-env 1929904]# kubectl get csv
NAME                                 DISPLAY                              VERSION   REPLACES                             PHASE
ibm-common-service-operator.v3.6.3   IBM Cloud Platform Common Services   3.6.3     ibm-common-service-operator.v3.6.2   Succeeded
[root@preserve-olm-env 1929904]# kubectl get csv ibm-common-service-operator.v3.6.3 -o yaml|grep "operatorframework.io/properties"
    operatorframework.io/properties: '{"properties":[{"type":"olm.gvk","value":{"group":"operator.ibm.com","kind":"CommonService","version":"v3"}},{"type":"olm.package","value":{"packageName":"ibm-common-service-operator","version":"3.6.3"}}]}'
          f:operatorframework.io/properties: {}
[root@preserve-olm-env 1929904]# kubectl patch -n default csv ibm-common-service-operator.v3.6.3 --type=json -p='[{"op":"remove","path":"/metadata/annotations/operatorframework.io~1properties"}]'
clusterserviceversion.operators.coreos.com/ibm-common-service-operator.v3.6.3 patched
[root@preserve-olm-env 1929904]# kubectl get csv ibm-common-service-operator.v3.6.3 -o yaml|grep "operatorframework.io/properties"
[root@preserve-olm-env 1929904]# cat sub.yaml 
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: test-ibm-integration-platform-navigator
  namespace: default
spec:
  channel: v4.1-eus
  installPlanApproval: Automatic
  name: ibm-integration-platform-navigator
  source: ibm-operator-catalog
  sourceNamespace: default
[root@preserve-olm-env 1929904]# kubectl create -f sub.yaml 
subscription.operators.coreos.com/test-ibm-integration-platform-navigator created
[root@preserve-olm-env 1929904]# kubectl get csv
NAME                                        DISPLAY                                            VERSION   REPLACES                                    PHASE
ibm-common-service-operator.v3.6.3          IBM Cloud Platform Common Services                 3.6.3     ibm-common-service-operator.v3.6.2          Succeeded
ibm-integration-platform-navigator.v4.1.1   IBM Cloud Pak for Integration Platform Navigator   4.1.1     ibm-integration-platform-navigator.v4.1.0   Installing
[root@preserve-olm-env 1929904]# kubectl get csv
NAME                                        DISPLAY                                            VERSION   REPLACES                                    PHASE
ibm-common-service-operator.v3.6.3          IBM Cloud Platform Common Services                 3.6.3     ibm-common-service-operator.v3.6.2          Succeeded
ibm-integration-platform-navigator.v4.1.1   IBM Cloud Pak for Integration Platform Navigator   4.1.1     ibm-integration-platform-navigator.v4.1.0   Installing
[root@preserve-olm-env 1929904]# kubectl get csv
NAME                                        DISPLAY                                            VERSION   REPLACES                                    PHASE
ibm-common-service-operator.v3.6.3          IBM Cloud Platform Common Services                 3.6.3     ibm-common-service-operator.v3.6.2          Succeeded
ibm-integration-platform-navigator.v4.1.1   IBM Cloud Pak for Integration Platform Navigator   4.1.1     ibm-integration-platform-navigator.v4.1.0   Succeeded
[root@preserve-olm-env 1929904]# 

--

Comment 7 errata-xmlrpc 2021-03-25 01:53:01 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (OpenShift Container Platform 4.7.3 bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:0821