Bug 1686121 - [marketplace] Operator is incorrectly reporting status and version in ClusterOperator
Summary: [marketplace] Operator is incorrectly reporting status and version in Cluster...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: OLM
Version: 4.1.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: 4.1.0
Assignee: Alexander Greene
QA Contact: Fan Jia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-06 18:50 UTC by Alexander Greene
Modified: 2019-06-04 10:45 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: The marketplace operator would set it's the operator as available and would never report progressing. Additionally, the ClusterOperator version was always set to "0.0.1" instead of the "0.0.1-snapshot", which CVO expects/replaces with the correct payload version. Consequence: The marketplace operator was not correctly reports status and version in it's ClusterOperator. Fix: The Marketplace ClusterOperator will now report progressing is true when the operator starts and report that the operator is available once it reconciles a number of CR's that it is watching. The marketplace ClusterOperator is also created with it's version set to "0.0.1-snapshot", which CVO looks for and replaces with the correct payload version. Result: The marketplace operator now correctly reports status and version in it's ClusterOperator.
Clone Of:
Environment:
Last Closed: 2019-06-04 10:45:04 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:0758 0 None None None 2019-06-04 10:45:10 UTC

Description Alexander Greene 2019-03-06 18:50:24 UTC
Description of problem:
The Marketplace Operator does not update it's clusteroperator to correctly portray the status of the operator.

Issues include:
1. The clusteroperator progress condition is never set to True. This condition should be set to display when a new version of the operator is being rolled out. When the operator has finishes deploying, the progress condition should be set to false and the Available/Failing conditions should be updated to reflect the state of the operator. Currently, the clusterOperator always has the following conditions:
Available = True
Progressing = False
Failing = False

2. The clusteroperator's operator version is set to "0.0.1", when it should actually be set to "0.0.1-snapshot" so the CVO can replace this value.


How reproducible: Always

Steps to Reproduce:
Create an Openshift cluster with the installer.

Comment 1 Fan Jia 2019-03-13 10:12:58 UTC
The content in "Status->Conditions" in the clusteroperator won't update during the cvo update progress. Some cluster operators changed and some didn't.

didn't change clusteroperator list:

operator-lifecycle-manager
openshift-cloud-credential-operator
monitoring
marketplace-operator
machine-api
ingress
image-registry
dns
cluster-storage-operator

Comment 2 Jian Zhang 2019-03-13 10:54:42 UTC
For example, the OLM version is updated after the OTA. But the "conditions" timestamps are not changed.

Before the upgarde:
[jzhang@dhcp-140-18 upgrade-12]$ oc get clusteroperator operator-lifecycle-manager -o yaml
apiVersion: config.openshift.io/v1
kind: ClusterOperator
metadata:
  creationTimestamp: 2019-03-13T03:59:53Z
  generation: 1
  name: operator-lifecycle-manager
  resourceVersion: "7470"
  selfLink: /apis/config.openshift.io/v1/clusteroperators/operator-lifecycle-manager
  uid: 74e476cc-4544-11e9-b378-062e67fbace6
spec: {}
status:
  conditions:
  - lastTransitionTime: 2019-03-13T03:59:53Z
    message: Done deploying 0.8.1.
    status: "False"
    type: Progressing
  - lastTransitionTime: 2019-03-13T03:59:53Z
    message: Done deploying 0.8.1.
    status: "False"
    type: Failing
  - lastTransitionTime: 2019-03-13T03:59:53Z
    message: Done deploying 0.8.1.
    status: "True"
    type: Available
  extension: null
  relatedObjects: null
  versions:
  - name: operator
    version: 0.8.1-416a6f1

After the upgarde:
[jzhang@dhcp-140-18 upgrade-12]$ oc get clusteroperator operator-lifecycle-manager -o yaml
apiVersion: config.openshift.io/v1
kind: ClusterOperator
metadata:
  creationTimestamp: 2019-03-13T03:59:53Z
  generation: 1
  name: operator-lifecycle-manager
  resourceVersion: "275609"
  selfLink: /apis/config.openshift.io/v1/clusteroperators/operator-lifecycle-manager
  uid: 74e476cc-4544-11e9-b378-062e67fbace6
spec: {}
status:
  conditions:
  - lastTransitionTime: 2019-03-13T03:59:53Z
    message: Done deploying 0.8.1.
    status: "False"
    type: Progressing
  - lastTransitionTime: 2019-03-13T03:59:53Z
    message: Done deploying 0.8.1.
    status: "False"
    type: Failing
  - lastTransitionTime: 2019-03-13T03:59:53Z
    message: Done deploying 0.8.1.
    status: "True"
    type: Available
  extension: null
  relatedObjects: null
  versions:
  - name: operator
    version: 0.8.1-ab6342f

Comment 13 Fan Jia 2019-03-20 02:26:19 UTC
one more PR : https://github.com/operator-framework/operator-marketplace/pull/134 for this bug will repair the probalistic measurement to "count of successful syncs ", and now it report the "payload version " as the operator version.
 
will test again after this PR is merged in the nightly build.

Comment 14 Alexander Greene 2019-03-21 16:40:28 UTC
PR https://github.com/operator-framework/operator-marketplace/pull/134 has been merged and is ready for review.

Comment 20 errata-xmlrpc 2019-06-04 10:45: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, 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:0758


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