Bug 1938618 - 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.6.z
Assignee: Kevin Rizza
QA Contact: kuiwang
URL:
Whiteboard:
Depends On: 1929904
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-03-15 01:06 UTC by OpenShift BugZilla Robot
Modified: 2021-03-30 17:03 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-03-30 17:03:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github operator-framework operator-lifecycle-manager pull 2043 0 None open [release-4.6] Bug 1938618: Infer package name property for unannotated CSVs, if possible. 2021-03-15 16:16:08 UTC
Red Hat Product Errata RHBA-2021:0952 0 None None None 2021-03-30 17:03:29 UTC

Comment 2 kuiwang 2021-03-22 02:07:20 UTC
verify it on 4.6. lgtm

--
[root@preserve-olm-env 1938618]# oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.6.0-0.nightly-2021-03-21-131139   True        False         13m     Cluster version is 4.6.0-0.nightly-2021-03-21-131139
[root@preserve-olm-env 1938618]# oc get pod -n openshift-operator-lifecycle-manager
NAME                                READY   STATUS    RESTARTS   AGE
catalog-operator-5b4f4bdc66-lcqxr   1/1     Running   0          42m
olm-operator-7fdf8cbd9-cbxw9        1/1     Running   0          42m
packageserver-646c856c84-4xhxp      1/1     Running   0          35m
packageserver-646c856c84-sp9gk      1/1     Running   0          35m
[root@preserve-olm-env 1938618]# oc exec catalog-operator-5b4f4bdc66-lcqxr -n openshift-operator-lifecycle-manager -- olm --version
OLM version: 0.16.1
git commit: 2cd064dba8bd60baa573af531970e6e567048f2b
[root@preserve-olm-env 1938618]# 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 1938618]# 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 1938618]# 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 1938618]# 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 1938618]# 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 1938618]# kubectl get csv ibm-common-service-operator.v3.6.3 -o yaml|grep "operatorframework.io/properties"
[root@preserve-olm-env 1938618]# 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 1938618]# kubectl create -f sub.yaml 
subscription.operators.coreos.com/test-ibm-integration-platform-navigator created
[root@preserve-olm-env 1938618]# 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 1938618]# 

--

Comment 5 errata-xmlrpc 2021-03-30 17:03:15 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.6.23 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:0952


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