Bug 1929904 - ClusterServiceVersion property inference does not infer package and version
Summary: ClusterServiceVersion property inference does not infer package and version
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: OLM
Version: 4.6
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.7.z
Assignee: Kevin Rizza
QA Contact: kuiwang
URL:
Whiteboard:
Depends On: 1921953
Blocks: 1938618
TreeView+ depends on / blocked
 
Reported: 2021-02-17 21:24 UTC by Vu Dinh
Modified: 2022-10-11 08:55 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1921953
Environment:
Last Closed: 2021-03-25 01:53:01 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github operator-framework operator-lifecycle-manager pull 2033 0 None open [release-4.7] Bug 1929904: Infer package name property for unannotated CSVs, if possible. 2021-03-05 20:30:48 UTC
Red Hat Product Errata RHBA-2021:0821 0 None None None 2021-03-25 01:53:16 UTC

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


Note You need to log in before you can comment on or make changes to this bug.