Bug 1982250

Summary: Performance Addon Operator fails to install after catalog source becomes ready
Product: OpenShift Container Platform Reporter: Anik <anbhatta>
Component: OLMAssignee: Anik <anbhatta>
OLM sub component: OLM QA Contact: xzha
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: high CC: achernet, alukiano, anbhatta, aos-bugs, cchun, eparis, imiller, jiazha, jokerman, keyoung, krizza, melserng, sponnaga
Version: 4.8Keywords: AutomationBlocker, Triaged
Target Milestone: ---   
Target Release: 4.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1960455 Environment:
Last Closed: 2021-07-27 23:14:04 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: 1960455    
Bug Blocks:    

Comment 2 xzha 2021-07-16 09:10:51 UTC
verify:

[root@preserve-olm-agent-test pla]# oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.8.0-0.nightly-2021-07-16-010020   True        False         69m     Cluster version is 4.8.0-0.nightly-2021-07-16-010020
[root@preserve-olm-agent-test pla]# oc adm release info registry.ci.openshift.org/ocp/release:4.8.0-0.nightly-2021-07-16-010020 --commits|grep operator-lifecycle-manager
  operator-lifecycle-manager                     https://github.com/openshift/operator-framework-olm                         2b803dd1e5e3160b6a53ce4808079bddd72283e9

1) install catsrc
[root@preserve-olm-agent-test ditto]# cat catsrc.yaml 
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  name: ditto-operator-index
  namespace: openshift-marketplace
spec:
  displayName: Test
  publisher: OLM-QE
  sourceType: grpc
  image: quay.io/olmqe/ditto-index:v1-4.8-xzha
  updateStrategy:
    registryPoll:
      interval: 10m
[root@preserve-olm-agent-test ditto]# oc apply -f catsrc.yaml 
catalogsource.operators.coreos.com/ditto-operator-index created

[root@preserve-olm-agent-test ditto]# oc get packagemanifest | grep ditto
ditto-operator                                       Test                   31s
ditto-operator                                       Community Operators    80m

2) create new-project, then install sub
[root@preserve-olm-agent-test ditto]# cat sub.yaml 
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: ditto-operator
  namespace: test-1
spec:
  channel: "alpha"
  installPlanApproval: Automatic
  name: ditto-operator
  source: ditto-operator-index 
  sourceNamespace: openshift-marketplace
[root@preserve-olm-agent-test ditto]# oc new-project test-1

[root@preserve-olm-agent-test ditto]# oc apply -f sub.yaml 
subscription.operators.coreos.com/ditto-operator created

3) check ip
NAME            CSV                     APPROVAL    APPROVED
install-2twdj   ditto-operator.v0.1.1   Automatic   true
[root@preserve-olm-agent-test ditto]# oc get ip -o yaml
apiVersion: v1
items:
- apiVersion: operators.coreos.com/v1alpha1
  kind: InstallPlan
  metadata:
    creationTimestamp: "2021-07-16T08:49:44Z"
    generateName: install-
    generation: 1
    labels:
      operators.coreos.com/ditto-operator.test-1: ""
    name: install-2twdj
    namespace: test-1
    ownerReferences:
    - apiVersion: operators.coreos.com/v1alpha1
      blockOwnerDeletion: false
      controller: false
      kind: Subscription
      name: ditto-operator
      uid: 7453df9d-9123-4a0f-ba9a-639cdb42f896
    resourceVersion: "57224"
    uid: caaa679e-41a4-4ef3-aed3-90d3b35bbfa0
  spec:
    approval: Automatic
    approved: true
    clusterServiceVersionNames:
    - ditto-operator.v0.1.1
    generation: 1
  status:
    bundleLookups:
    - catalogSourceRef:
        name: ditto-operator-index
        namespace: openshift-marketplace
      conditions:
      - message: bundle contents have not yet been persisted to installplan status
        reason: BundleNotUnpacked
        status: "True"
        type: BundleLookupNotPersisted
      - message: unpack job not yet started
        reason: JobNotStarted
        status: "True"
        type: BundleLookupPending
      identifier: ditto-operator.v0.1.1
      path: quay.io/olmqe/ditto-operator:0.1.1
      properties: '{"properties":[{"type":"olm.gvk","value":{"group":"iot.eclipse.org","kind":"Ditto","version":"v1alpha1"}},{"type":"olm.package","value":{"packageName":"ditto-operator","version":"0.1.1"}}]}'
      replaces: ditto-operator.v0.1.0
    catalogSources: []
    conditions:
    - lastTransitionTime: "2021-07-16T08:49:44Z"
      lastUpdateTime: "2021-07-16T08:49:53Z"
      message: no operator group found that is managing this namespace
      reason: InstallCheckFailed
      status: "False"
      type: Installed
    phase: Installing
kind: List
metadata:
  resourceVersion: ""
  selfLink: ""

check the ip is in "Installing" phase, not Failed.

4) install og
[root@preserve-olm-agent-test ditto]# cat og.yaml 
kind: OperatorGroup
apiVersion: operators.coreos.com/v1
metadata:
  name: og-single
  namespace: test-1
spec:
  targetNamespaces:
  - test-1
[root@preserve-olm-agent-test ditto]# oc apply -f og.yaml 
operatorgroup.operators.coreos.com/og-single created
[root@preserve-olm-agent-test ditto]# oc get og
NAME        AGE
og-single   5s

[root@preserve-olm-agent-test ditto]# oc get ip
NAME            CSV                     APPROVAL    APPROVED
install-2twdj   ditto-operator.v0.1.1   Automatic   true
[root@preserve-olm-agent-test ditto]# oc get ip install-2twdj -o yaml
apiVersion: operators.coreos.com/v1alpha1
kind: InstallPlan
metadata:
  creationTimestamp: "2021-07-16T08:49:44Z"
  generateName: install-
  generation: 1
  labels:
    operators.coreos.com/ditto-operator.test-1: ""
  name: install-2twdj
  namespace: test-1
  ......
  conditions:
  - lastTransitionTime: "2021-07-16T08:51:05Z"
    lastUpdateTime: "2021-07-16T08:51:05Z"
    status: "True"
    type: Installed
  phase: Complete
.....

[root@preserve-olm-agent-test ditto]# oc get csv
NAME                              DISPLAY                            VERSION    REPLACES                PHASE
ditto-operator.v0.1.1             Eclipse Ditto                      0.1.1      ditto-operator.v0.1.0   Installing
elasticsearch-operator.5.1.0-96   OpenShift Elasticsearch Operator   5.1.0-96                           Succeeded
[root@preserve-olm-agent-test ditto]# oc get csv
NAME                              DISPLAY                            VERSION    REPLACES                PHASE
ditto-operator.v0.1.1             Eclipse Ditto                      0.1.1      ditto-operator.v0.1.0   Succeeded
elasticsearch-operator.5.1.0-96   OpenShift Elasticsearch Operator   5.1.0-96                           Succeeded


LGTM, verified.

Comment 3 Ankita Thomas 2021-07-16 16:22:13 UTC
*** Bug 1982249 has been marked as a duplicate of this bug. ***

Comment 6 errata-xmlrpc 2021-07-27 23:14:04 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 (Moderate: OpenShift Container Platform 4.8.2 bug fix and security 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/RHSA-2021:2438