Bug 1717638 - clusteroperator/operator-lifecycle-manager-catalog does not define any related resources
Summary: clusteroperator/operator-lifecycle-manager-catalog does not define any relate...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: OLM
Version: 4.1.0
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: ---
: 4.2.0
Assignee: Jeff Peeler
QA Contact: Bruno Andrade
URL:
Whiteboard:
: 1745272 (view as bug list)
Depends On:
Blocks: 1738203
TreeView+ depends on / blocked
 
Reported: 2019-06-05 20:42 UTC by Luis Sanchez
Modified: 2019-10-16 06:31 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
: 1738203 (view as bug list)
Environment:
Last Closed: 2019-10-16 06:31:27 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 1018 0 None closed Bug 1717636: Add proper name to related objects 2020-08-07 20:46:27 UTC
Red Hat Product Errata RHBA-2019:2922 0 None None None 2019-10-16 06:31:47 UTC

Description Luis Sanchez 2019-06-05 20:42:14 UTC
Description of problem:

The operator-lifecycle-manager-catalog ClusterOperator resource does not specify any related resources. This hinders problem-determination as tools cannot automatically collect the information needed to debug issues.

The operator should specify, at minimum, a namespace and a configuration resource to collect.

Here is an example from kube-apisever:

kind: ClusterOperator
metadata:
  name: kube-apiserver
status:
  relatedObjects:
    - group: operator.openshift.io
      name: cluster
      resource: kubeapiservers
    - group: ''
      name: openshift-config
      resource: namespaces
    - group: ''
      name: openshift-config-managed
      resource: namespaces
    - group: ''
      name: openshift-kube-apiserver-operator
      resource: namespaces
    - group: ''
      name: openshift-kube-apiserver
      resource: namespaces


A new e2e test designed to catch this deficiency will white-list this component initially. This component should be removed from the white-list as part of resolving this issue.

https://github.com/openshift/origin/blob/master/test/extended/operators/clusteroperators.go (link will be active once https://github.com/openshift/origin/pull/23044 merges)

Comment 2 Eric Rich 2019-07-05 12:41:14 UTC
Will this address https://bugzilla.redhat.com/show_bug.cgi?id=1726197

Comment 3 Evan Cordell 2019-08-06 13:54:54 UTC
This re-targeted to 4.2, 1738203 is the clone that targets 4.1.z

Comment 6 Jian Zhang 2019-08-27 08:11:15 UTC
 Cluster version is 4.2.0-0.nightly-2019-08-25-233755
OLM version:
mac:~ jianzhang$ oc exec catalog-operator-84bf5bfd65-9c9wm -- olm --version
OLM version: 0.11.0
git commit: a96b2b847d084b05541b9f37c53b88eb3944a935


mac:~ jianzhang$ oc get co operator-lifecycle-manager -o yaml
apiVersion: config.openshift.io/v1
kind: ClusterOperator
metadata:
  creationTimestamp: "2019-08-26T03:15:06Z"
  generation: 1
  name: operator-lifecycle-manager
  resourceVersion: "128794"
  selfLink: /apis/config.openshift.io/v1/clusteroperators/operator-lifecycle-manager
  uid: b4460dd7-c7af-11e9-9684-000d3a968e28
spec: {}
status:
  conditions:
  - lastTransitionTime: "2019-08-26T03:15:06Z"
    status: "False"
    type: Degraded
  - lastTransitionTime: "2019-08-26T08:31:34Z"
    message: Deployed 0.11.0
    status: "False"
    type: Progressing
  - lastTransitionTime: "2019-08-26T03:15:06Z"
    status: "True"
    type: Available
  - lastTransitionTime: "2019-08-26T03:15:06Z"
    status: "True"
    type: Upgradeable
  extension: null
  relatedObjects:
  - group: operators.coreos.com
    name: ""
    namespace: openshift-operator-lifecycle-manager
    resource: OperatorGroup
  - group: operators.coreos.com
    name: ""
    namespace: openshift-operator-lifecycle-manager
    resource: ClusterServiceVersion
  - group: ""
    name: openshift-operator-lifecycle-manager
    resource: namespaces
  versions:
  - name: operator
    version: 4.2.0-0.nightly-2019-08-25-233755
  - name: operator-lifecycle-manager
    version: 0.11.0

Some objects lack the "name" or "group" values, verify failed, see below:
mac:~ jianzhang$ oc get co operator-lifecycle-manager-catalog -o yaml
apiVersion: config.openshift.io/v1
kind: ClusterOperator
metadata:
  creationTimestamp: "2019-08-26T03:15:06Z"
  generation: 1
  name: operator-lifecycle-manager-catalog
  resourceVersion: "130909"
  selfLink: /apis/config.openshift.io/v1/clusteroperators/operator-lifecycle-manager-catalog
  uid: b42a4060-c7af-11e9-8489-000d3a968d5d
spec: {}
status:
  conditions:
  - lastTransitionTime: "2019-08-26T03:15:06Z"
    status: "False"
    type: Degraded
  - lastTransitionTime: "2019-08-26T08:35:55Z"
    message: Deployed 0.11.0
    status: "False"
    type: Progressing
  - lastTransitionTime: "2019-08-26T03:15:06Z"
    status: "True"
    type: Available
  - lastTransitionTime: "2019-08-26T03:15:06Z"
    status: "True"
    type: Upgradeable
  extension: null
  relatedObjects:
  - group: operators.coreos.com
    name: ""
    namespace: openshift-marketplace
    resource: Subscription
  - group: operators.coreos.com
    name: ""
    namespace: openshift-marketplace
    resource: InstallPlan
  - group: ""
    name: openshift-marketplace
    resource: namespaces
  versions:
  - name: operator
    version: 4.2.0-0.nightly-2019-08-25-233755
  - name: operator-lifecycle-manager
    version: 0.11.0

mac:~ jianzhang$ oc get co operator-lifecycle-manager-packageserver  -o yaml
apiVersion: config.openshift.io/v1
kind: ClusterOperator
metadata:
  creationTimestamp: "2019-08-26T03:15:06Z"
  generation: 1
  name: operator-lifecycle-manager-packageserver
  resourceVersion: "534556"
  selfLink: /apis/config.openshift.io/v1/clusteroperators/operator-lifecycle-manager-packageserver
  uid: b4455291-c7af-11e9-9684-000d3a968e28
spec: {}
status:
  conditions:
  - lastTransitionTime: "2019-08-26T03:15:06Z"
    status: "False"
    type: Degraded
  - lastTransitionTime: "2019-08-26T22:09:40Z"
    status: "True"
    type: Available
  - lastTransitionTime: "2019-08-26T22:09:40Z"
    message: Deployed version 0.11.0
    status: "False"
    type: Progressing
  extension: null
  relatedObjects:
  - group: ""
    name: openshift-operator-lifecycle-manager
    resource: namespaces
  - group: operators.coreos.com
    name: packageserver
    namespace: openshift-operator-lifecycle-manager
    resource: ClusterServiceVersion
  versions:
  - name: operator
    version: 4.2.0-0.nightly-2019-08-25-233755
  - name: packageserver
    version: 0.11.0

Comment 7 Jeff Peeler 2019-08-28 00:24:36 UTC
The fix for the failed verification has been merged now:
https://github.com/operator-framework/operator-lifecycle-manager/pull/1012

I think this should be a quick re-test for verification. Since it's easy to test for both operators, please verify https://bugzilla.redhat.com/show_bug.cgi?id=1717636 at the same time.

Comment 11 Jian Zhang 2019-08-28 10:12:16 UTC
Hi, Vu

Understand, the cluster just ready for the test.
mac:~ jianzhang$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.2.0-0.nightly-2019-08-28-035628   True        False         14m     Cluster version is 4.2.0-0.nightly-2019-08-28-035628

mac:~ jianzhang$ oc exec catalog-operator-9d8bc57c-5v67r -- olm --version
OLM version: 0.11.0
git commit: 2959328fba0d1909ff9f24b365c2d8acbd3a19da


1) Why the name of the related 'OperatorGroup' is "operator-lifecycle-manager"? Based on my understanding, it should be 'olm-operators.'
mac:~ jianzhang$ oc get og -n openshift-operator-lifecycle-manager
NAME            AGE
olm-operators   79m

mac:~ jianzhang$ oc get co operator-lifecycle-manager  -o yaml
apiVersion: config.openshift.io/v1
kind: ClusterOperator
metadata:
  creationTimestamp: "2019-08-28T08:49:47Z"
  generation: 1
  name: operator-lifecycle-manager
  resourceVersion: "11282"
  selfLink: /apis/config.openshift.io/v1/clusteroperators/operator-lifecycle-manager
  uid: c9c3ea50-c970-11e9-af7e-02a878b9a6e2
spec: {}
status:
  conditions:
  - lastTransitionTime: "2019-08-28T08:49:47Z"
    status: "False"
    type: Degraded
  - lastTransitionTime: "2019-08-28T08:54:52Z"
    message: Deployed 0.11.0
    status: "False"
    type: Progressing
  - lastTransitionTime: "2019-08-28T08:49:47Z"
    status: "True"
    type: Available
  - lastTransitionTime: "2019-08-28T08:49:47Z"
    status: "True"
    type: Upgradeable
  extension: null
  relatedObjects:
  - group: operators.coreos.com
    name: operator-lifecycle-manager
    namespace: openshift-operator-lifecycle-manager
    resource: OperatorGroup
  - group: operators.coreos.com
    name: operator-lifecycle-manager
    namespace: openshift-operator-lifecycle-manager
    resource: ClusterServiceVersion
  - group: ""
    name: openshift-operator-lifecycle-manager
    resource: namespaces
  versions:
  - name: operator
    version: 4.2.0-0.nightly-2019-08-28-035628
  - name: operator-lifecycle-manager
    version: 0.11.0

2) Why the 'namespace' is 'openshift-marketplace'?
mac:~ jianzhang$ oc get sub -n openshift-marketplace
No resources found.
mac:~ jianzhang$ oc get ip -n openshift-marketplace
No resources found.

mac:~ jianzhang$ oc get co operator-lifecycle-manager-catalog  -o yaml
apiVersion: config.openshift.io/v1
kind: ClusterOperator
metadata:
  creationTimestamp: "2019-08-28T08:49:49Z"
  generation: 1
  name: operator-lifecycle-manager-catalog
  resourceVersion: "11310"
  selfLink: /apis/config.openshift.io/v1/clusteroperators/operator-lifecycle-manager-catalog
  uid: cb28b35f-c970-11e9-af7e-02a878b9a6e2
spec: {}
status:
  conditions:
  - lastTransitionTime: "2019-08-28T08:49:49Z"
    status: "False"
    type: Degraded
  - lastTransitionTime: "2019-08-28T08:54:54Z"
    message: Deployed 0.11.0
    status: "False"
    type: Progressing
  - lastTransitionTime: "2019-08-28T08:49:49Z"
    status: "True"
    type: Available
  - lastTransitionTime: "2019-08-28T08:49:49Z"
    status: "True"
    type: Upgradeable
  extension: null
  relatedObjects:
  - group: operators.coreos.com
    name: operator-lifecycle-manager-catalog
    namespace: openshift-marketplace
    resource: Subscription
  - group: operators.coreos.com
    name: operator-lifecycle-manager-catalog
    namespace: openshift-marketplace
    resource: InstallPlan
  - group: ""
    name: openshift-marketplace
    resource: namespaces
  versions:
  - name: operator
    version: 4.2.0-0.nightly-2019-08-28-035628
  - name: operator-lifecycle-manager
    version: 0.11.0

3) Related packageserver object looks good.
mac:~ jianzhang$ oc get csv -n openshift-operator-lifecycle-manager
NAME            DISPLAY          VERSION   REPLACES   PHASE
packageserver   Package Server   0.11.0               Succeeded

mac:~ jianzhang$ oc get co operator-lifecycle-manager-packageserver  -o yaml
apiVersion: config.openshift.io/v1
kind: ClusterOperator
metadata:
  creationTimestamp: "2019-08-28T08:49:47Z"
  generation: 1
  name: operator-lifecycle-manager-packageserver
  resourceVersion: "7800"
  selfLink: /apis/config.openshift.io/v1/clusteroperators/operator-lifecycle-manager-packageserver
  uid: c9c56327-c970-11e9-af7e-02a878b9a6e2
spec: {}
status:
  conditions:
  - lastTransitionTime: "2019-08-28T08:49:47Z"
    status: "False"
    type: Degraded
  - lastTransitionTime: "2019-08-28T08:52:48Z"
    status: "True"
    type: Available
  - lastTransitionTime: "2019-08-28T08:52:48Z"
    message: Deployed version 0.11.0
    status: "False"
    type: Progressing
  - lastTransitionTime: "2019-08-28T08:49:47Z"
    message: Safe to upgrade
    status: "True"
    type: Upgradeable
  extension: null
  relatedObjects:
  - group: ""
    name: openshift-operator-lifecycle-manager
    resource: namespaces
  - group: operators.coreos.com
    name: packageserver
    namespace: openshift-operator-lifecycle-manager
    resource: ClusterServiceVersion
  versions:
  - name: operator
    version: 4.2.0-0.nightly-2019-08-28-035628
  - name: packageserver
    version: 0.11.0

Change status to 'ASSIGNED' based on my understanding, correct me if I'm wrong, thanks!

Comment 12 Evan Cordell 2019-08-28 22:51:05 UTC
*** Bug 1745272 has been marked as a duplicate of this bug. ***

Comment 13 Jeff Peeler 2019-09-04 21:57:40 UTC
The PR here: https://github.com/operator-framework/operator-lifecycle-manager/pull/1018 also addresses this bugzilla.

Comment 15 Bruno Andrade 2019-09-06 15:13:53 UTC
It still have some pending issues mentioned on comment #11 by Jian Zhang.

Cluster version: 4.2.0-0.nightly-2019-09-06-073347
OLM version: 0.11.0
git commit: 09537286f6e8ca771f99287b3d09e6e595f5b8e2

1) OperatorGroup based on our understanding, should be olm-operators instead of 'operator-lifecycle-manager'

oc get og -n openshift-operator-lifecycle-manager
NAME            AGE
olm-operators   48m

oc get co operator-lifecycle-manager  -o yaml
apiVersion: config.openshift.io/v1
kind: ClusterOperator
metadata:
{...}
spec: {}
status:
 {...}
  extension: null
  relatedObjects:
  - group: operators.coreos.com
    name: operator-lifecycle-manager
    namespace: openshift-operator-lifecycle-manager
    resource: OperatorGroup
  - group: operators.coreos.com
    name: operator-lifecycle-manager
    namespace: openshift-operator-lifecycle-manager
    resource: ClusterServiceVersion
  - group: ""
    name: openshift-operator-lifecycle-manager
    resource: namespaces

2) Why the 'namespace' is 'openshift-marketplace'?

 oc get co operator-lifecycle-manager-catalog  -o yaml
apiVersion: config.openshift.io/v1
kind: ClusterOperator
metadata:
{...}
spec: {}
status:
  conditions:
{...}
  extension: null
  relatedObjects:
  - group: operators.coreos.com
    name: operator-lifecycle-manager-catalog
    namespace: openshift-marketplace
    resource: Subscription
  - group: operators.coreos.com
    name: operator-lifecycle-manager-catalog
    namespace: openshift-marketplace
    resource: InstallPlan
  - group: ""
    name: openshift-marketplace
    resource: namespaces
  versions:
  - name: operator
    version: 4.2.0-0.nightly-2019-09-06-073347
  - name: operator-lifecycle-manager
    version: 0.11.0

oc get csv -n openshift-marketplace
No resources found.

oc get subs -n openshift-marketplace
No resources found.

Change status to 'ASSIGNED' based on my understanding, correct me if I'm wrong.

Comment 16 Jeff Peeler 2019-09-06 16:01:55 UTC
Please ensure that you're testing the correct version that includes the latest fix. Based on the git commit you tested with:

c799a513 (jpeeler/add-fields-related-objects-2, add-fields-related-objects-2) fix(clusteroperator): update status after initial creation
ba9049b7 fix(clusteroperator): fix naming of related objects
8fede0b7 add default for packagemanifests/icon subresource
db97a174 Merge pull request #1023 from tkashem/bz-1744245
2b6038f4 Merge pull request #1025 from njhale/clean-env
b10307f7 fix(init): cleanup leftover cross-namespace  ownerreferences
eee9e140 feat(readme) : Ajustments
f5a4fd8d feat(github) : Add github files in order to follow org standard
8432e24f Bugzilla 1744245: Subscription should not point to deleted ip
a011531d Drop the hard-coded DNS suffix
09537286 Merge pull request #1011 from skitt/pgrep-no-q

To make it even easier, the latest change doesn't include operator groups. So if you see that in the output, the version of OLM needs to be updated.

Comment 17 Bruno Andrade 2019-09-06 16:43:31 UTC
Ok, I will wait for the next payloads and check if it contains the proper commits included. Thanks

Comment 18 Bruno Andrade 2019-09-09 16:34:10 UTC
LGTM, marking as VERIFIED.

Cluster Version: 4.2.0-0.nightly-2019-09-09-073137
OLM version: 0.11.0
git commit: d6056ddf181798e740178d2c6cad76d60bd0b52c

Steps used to verify:

oc get co  operator-lifecycle-manager -o yaml
apiVersion: config.openshift.io/v1
kind: ClusterOperator
metadata:
  creationTimestamp: "2019-09-09T13:15:29Z"
  generation: 1
  name: operator-lifecycle-manager
  resourceVersion: "11677"
  selfLink: /apis/config.openshift.io/v1/clusteroperators/operator-lifecycle-manager
  uid: e56bcf9a-d303-11e9-a590-023497575af2
spec: {}
status:
  conditions:
  - lastTransitionTime: "2019-09-09T13:15:29Z"
    status: "False"
    type: Degraded
  - lastTransitionTime: "2019-09-09T13:20:35Z"
    message: Deployed 0.11.0
    status: "False"
    type: Progressing
  - lastTransitionTime: "2019-09-09T13:15:29Z"
    status: "True"
    type: Available
  - lastTransitionTime: "2019-09-09T13:15:29Z"
    status: "True"
    type: Upgradeable
  extension: null
  relatedObjects:
  - group: operators.coreos.com
    name: packageserver
    namespace: openshift-operator-lifecycle-manager
    resource: ClusterServiceVersion
  - group: ""
    name: openshift-operator-lifecycle-manager
    resource: namespaces
  versions:
  - name: operator
    version: 4.2.0-0.nightly-2019-09-09-073137
  - name: operator-lifecycle-manager
    version: 0.11.0

oc get co  operator-lifecycle-manager -o yaml
apiVersion: config.openshift.io/v1
kind: ClusterOperator
metadata:
  creationTimestamp: "2019-09-09T13:15:29Z"
  generation: 1
  name: operator-lifecycle-manager
  resourceVersion: "11677"
  selfLink: /apis/config.openshift.io/v1/clusteroperators/operator-lifecycle-manager
  uid: e56bcf9a-d303-11e9-a590-023497575af2
spec: {}
status:
  conditions:
  - lastTransitionTime: "2019-09-09T13:15:29Z"
    status: "False"
    type: Degraded
  - lastTransitionTime: "2019-09-09T13:20:35Z"
    message: Deployed 0.11.0
    status: "False"
    type: Progressing
  - lastTransitionTime: "2019-09-09T13:15:29Z"
    status: "True"
    type: Available
  - lastTransitionTime: "2019-09-09T13:15:29Z"
    status: "True"
    type: Upgradeable
  extension: null
  relatedObjects:
  - group: operators.coreos.com
    name: packageserver
    namespace: openshift-operator-lifecycle-manager
    resource: ClusterServiceVersion
  - group: ""
    name: openshift-operator-lifecycle-manager
    resource: namespaces
  versions:
  - name: operator
    version: 4.2.0-0.nightly-2019-09-09-073137
  - name: operator-lifecycle-manager
    version: 0.11.0

oc get co  operator-lifecycle-manager-packageserver -o yaml
apiVersion: config.openshift.io/v1
kind: ClusterOperator
metadata:
  creationTimestamp: "2019-09-09T13:15:29Z"
  generation: 1
  name: operator-lifecycle-manager-packageserver
  resourceVersion: "6836"
  selfLink: /apis/config.openshift.io/v1/clusteroperators/operator-lifecycle-manager-packageserver
  uid: e5624607-d303-11e9-a590-023497575af2
spec: {}
status:
  conditions:
  - lastTransitionTime: "2019-09-09T13:15:29Z"
    status: "False"
    type: Degraded
  - lastTransitionTime: "2019-09-09T13:18:20Z"
    status: "True"
    type: Available
  - lastTransitionTime: "2019-09-09T13:18:20Z"
    message: Deployed version 0.11.0
    status: "False"
    type: Progressing
  - lastTransitionTime: "2019-09-09T13:15:29Z"
    message: Safe to upgrade
    status: "True"
    type: Upgradeable
  extension: null
  relatedObjects:
  - group: ""
    name: openshift-operator-lifecycle-manager
    resource: namespaces
  - group: operators.coreos.com
    name: packageserver
    namespace: openshift-operator-lifecycle-manager
    resource: ClusterServiceVersion
  versions:
  - name: operator
    version: 4.2.0-0.nightly-2019-09-09-073137
  - name: packageserver
    version: 0.11

Comment 20 errata-xmlrpc 2019-10-16 06:31:27 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, 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-2019:2922


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