Bug 1933779

Summary: Failure to upgrade operator when a Service is included in a Bundle
Product: OpenShift Container Platform Reporter: Ben Luddy <bluddy>
Component: OLMAssignee: Ben Luddy <bluddy>
OLM sub component: OLM QA Contact: kuiwang
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: high CC: aos-bugs, bluddy, dmesser, krizza, kuiwang, msoriano, openshift-bugzilla-robot, pbertera, sople, tomckay, ttaylor
Version: 4.6Keywords: Triaged
Target Milestone: ---   
Target Release: 4.5.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1920873 Environment:
Last Closed: 2021-03-17 15:03:55 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: 1920873    
Bug Blocks:    

Comment 2 kuiwang 2021-03-08 05:45:02 UTC
verify it on 4.5. LGTM

--
[root@preserve-olm-env 1933779]# cd /root/kuiwang/cases/1933779
[root@preserve-olm-env 1933779]# oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.5.0-0.nightly-2021-03-07-050502   True        False         2m16s   Cluster version is 4.5.0-0.nightly-2021-03-07-050502
[root@preserve-olm-env 1933779]# oc get pod -n openshift-operator-lifecycle-manager
NAME                               READY   STATUS    RESTARTS   AGE
catalog-operator-6965d47bf-lxdss   1/1     Running   0          28m
olm-operator-7f4584564-x4llv       1/1     Running   0          28m
packageserver-5fcb47f965-72k4l     1/1     Running   0          20m
packageserver-5fcb47f965-cwkm8     1/1     Running   0          20m
[root@preserve-olm-env 1933779]# oc exec catalog-operator-6965d47bf-lxdss -n openshift-operator-lifecycle-manager -- olm --version
OLM version: 0.15.1
git commit: a0403e7431a5da200b861da370813831e38c579a
[root@preserve-olm-env 1933779]# cat og-single.yaml
kind: OperatorGroup
apiVersion: operators.coreos.com/v1
metadata:
  name: og-single1
  namespace: default
spec:
  targetNamespaces:
  - default
[root@preserve-olm-env 1933779]# oc apply -f og-single.yaml
operatorgroup.operators.coreos.com/og-single1 created
[root@preserve-olm-env 1933779]# cat teiidcatsrc.yaml
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  name: teiid
  namespace: default
spec:
  displayName: "teiid Operators"
  image: quay.io/kuiwang/teiid-index:1898500
  publisher: QE
  sourceType: grpc
[root@preserve-olm-env 1933779]# oc apply -f teiidcatsrc.yaml
catalogsource.operators.coreos.com/teiid created
[root@preserve-olm-env 1933779]# cat teiidsub.yaml
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: teiid
  namespace: default
spec:
  source: teiid
  sourceNamespace: default

  channel: alpha
  installPlanApproval: Automatic
  name: teiid
[root@preserve-olm-env 1933779]# oc apply -f teiidsub.yaml
subscription.operators.coreos.com/teiid created
[root@preserve-olm-env 1933779]# 
[root@preserve-olm-env 1933779]# oc get csv
NAME           DISPLAY   VERSION   REPLACES   PHASE
teiid.v0.3.0   Teiid     0.3.0                Succeeded
[root@preserve-olm-env 1933779]# oc get svc teiid-service -o yaml
apiVersion: v1
kind: Service
metadata:
  creationTimestamp: "2021-03-08T05:37:48Z"
  labels:
    app: teiid-operator
  managedFields:
  - apiVersion: v1
    fieldsType: FieldsV1
    fieldsV1:
      f:metadata:
        f:labels:
          .: {}
          f:app: {}
        f:ownerReferences:
          .: {}
          k:{"uid":"503e7e03-7573-4691-8218-944e565db6f6"}:
            .: {}
            f:apiVersion: {}
            f:blockOwnerDeletion: {}
            f:controller: {}
            f:kind: {}
            f:name: {}
            f:uid: {}
      f:spec:
        f:ports:
          .: {}
          k:{"port":8443,"protocol":"TCP"}:
            .: {}
            f:name: {}
            f:port: {}
            f:protocol: {}
            f:targetPort: {}
        f:selector:
          .: {}
          f:app: {}
        f:sessionAffinity: {}
        f:type: {}
    manager: catalog
    operation: Update
    time: "2021-03-08T05:37:48Z"
  name: teiid-service
  namespace: default
  ownerReferences:
  - apiVersion: operators.coreos.com/v1alpha1
    blockOwnerDeletion: false
    controller: false
    kind: ClusterServiceVersion
    name: teiid.v0.3.0
    uid: 503e7e03-7573-4691-8218-944e565db6f6
  resourceVersion: "23678"
  selfLink: /api/v1/namespaces/default/services/teiid-service
  uid: 54a60b97-5b39-4af3-a6a5-46b68cef55a0
spec:
  clusterIP: 172.30.183.175
  ports:
  - name: https
    port: 8443
    protocol: TCP
    targetPort: https
  selector:
    app: teiid-operator
  sessionAffinity: None
  type: ClusterIP
status:
  loadBalancer: {}
[root@preserve-olm-env 1933779]# oc patch sub teiid -n default --type merge -p '{"spec": {"channel": "beta"}}'
subscription.operators.coreos.com/teiid patched
[root@preserve-olm-env 1933779]# oc get ip
NAME            CSV            APPROVAL    APPROVED
install-dtrlm   teiid.v0.4.0   Automatic   true
install-xw5qv   teiid.v0.3.0   Automatic   true
[root@preserve-olm-env 1933779]# oc get csv
NAME           DISPLAY   VERSION   REPLACES       PHASE
teiid.v0.3.0   Teiid     0.3.0                    Replacing
teiid.v0.4.0   Teiid     0.4.0     teiid.v0.3.0   Installing
[root@preserve-olm-env 1933779]# oc get csv
NAME           DISPLAY   VERSION   REPLACES       PHASE
teiid.v0.4.0   Teiid     0.4.0     teiid.v0.3.0   Succeeded
[root@preserve-olm-env 1933779]# oc get svc teiid-service -o yaml
apiVersion: v1
kind: Service
metadata:
  creationTimestamp: "2021-03-08T05:37:48Z"
  labels:
    app: teiid-operator
  managedFields:
  - apiVersion: v1
    fieldsType: FieldsV1
    fieldsV1:
      f:metadata:
        f:labels:
          .: {}
          f:app: {}
        f:ownerReferences:
          .: {}
          k:{"uid":"2d245ee0-4ecf-4441-afe8-0f2b270efce4"}:
            .: {}
            f:apiVersion: {}
            f:blockOwnerDeletion: {}
            f:controller: {}
            f:kind: {}
            f:name: {}
            f:uid: {}
      f:spec:
        f:ports:
          .: {}
          k:{"port":8443,"protocol":"TCP"}:
            .: {}
            f:name: {}
            f:port: {}
            f:protocol: {}
            f:targetPort: {}
        f:selector:
          .: {}
          f:app: {}
        f:sessionAffinity: {}
        f:type: {}
    manager: catalog
    operation: Update
    time: "2021-03-08T05:41:18Z"
  name: teiid-service
  namespace: default
  ownerReferences:
  - apiVersion: operators.coreos.com/v1alpha1
    blockOwnerDeletion: false
    controller: false
    kind: ClusterServiceVersion
    name: teiid.v0.4.0
    uid: 2d245ee0-4ecf-4441-afe8-0f2b270efce4
  resourceVersion: "24853"
  selfLink: /api/v1/namespaces/default/services/teiid-service
  uid: 54a60b97-5b39-4af3-a6a5-46b68cef55a0
spec:
  clusterIP: 172.30.183.175
  ports:
  - name: https
    port: 8443
    protocol: TCP
    targetPort: https
  selector:
    app: teiid-operator
  sessionAffinity: None
  type: ClusterIP
status:
  loadBalancer: {}
[root@preserve-olm-env 1933779]# 

--

Comment 3 Tom McKay 2021-03-09 11:23:56 UTC
Which specific 4.6 z-stream is this resolved in? It is confirmed an issue in 4.6.8.

Comment 5 Ben Luddy 2021-03-09 17:02:23 UTC
Tom, this patch didn't release in 4.6 until 4.6.16 (see https://bugzilla.redhat.com/show_bug.cgi?id=1920873#c5).

Comment 7 errata-xmlrpc 2021-03-17 15:03:55 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.5.35 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:0785