Bug 1881542 - The marketplace co should recover after other clusterOperators work well when the success ratio meets 0.3
Summary: The marketplace co should recover after other clusterOperators work well when...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: OLM
Version: 4.5
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 4.5.z
Assignee: Anik
QA Contact: Jian Zhang
URL:
Whiteboard:
: 1899258 (view as bug list)
Depends On: 1881540
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-22 16:32 UTC by Alexander Greene
Modified: 2020-12-01 10:49 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-12-01 10:48:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github operator-framework operator-marketplace pull 356 0 None closed Bug 1881542: Set all CO conditions on meeting expected sync ratio 2020-12-10 21:05:38 UTC
Red Hat Product Errata RHSA-2020:5194 0 None None None 2020-12-01 10:49:34 UTC

Description Alexander Greene 2020-09-22 16:32:40 UTC
This bug was initially created as a copy of Bug #1881540

I am copying this bug because: The ratio sync logic exists in 4.5



Description of problem:
Only the "Upgradeable" and "Degraded" status set when the sync ratio > 0.3, lack of the "VERSION   AVAILABLE   PROGRESSING" conditions set.

[root@preserve-olm-env data]# oc get co
...
NAME                                       VERSION   AVAILABLE   PROGRESSING   DEGRADED   SINCE
...
machine-config                             4.5.2     True        False         False      13m
marketplace                                                                    False  

Version-Release number of selected component (if applicable):
[root@preserve-olm-env data]# oc exec marketplace-operator-798d596899-6hjs4 -- marketplace-operator --version
Marketplace source git commit: eeeee277407370e56b445a9c6630507161bb16d3
time="2020-07-16T10:31:53Z" level=info msg="Go Version: go1.13.4"
time="2020-07-16T10:31:53Z" level=info msg="Go OS/Arch: linux/amd64"
time="2020-07-16T10:31:53Z" level=info msg="operator-sdk Version: v0.8.0"

How reproducible:
always

Steps to Reproduce:
1. Install OCP 4.5.2.
2. Create some invlide CRs.
3. check the marketplace cluster operator.

Actual results:
Lack of the "VERSION   AVAILABLE   PROGRESSING SINCE" conditions status. And, get the errors:
[root@preserve-olm-env data]# oc get clusterversion
NAME      VERSION   AVAILABLE   PROGRESSING   SINCE   STATUS
version             False       True          47m     Unable to apply 4.5.2: the cluster operator marketplace has not yet successfully rolled out

[root@preserve-olm-env data]# oc get co marketplace -o yaml
apiVersion: config.openshift.io/v1
kind: ClusterOperator
metadata:
  creationTimestamp: "2020-07-16T01:48:36Z"
  generation: 1
  managedFields:
  - apiVersion: config.openshift.io/v1
    fieldsType: FieldsV1
    fieldsV1:
      f:spec: {}
      f:status:
        .: {}
        f:extension: {}
        f:versions: {}
    manager: cluster-version-operator
    operation: Update
    time: "2020-07-16T01:48:37Z"
  - apiVersion: config.openshift.io/v1
    fieldsType: FieldsV1
    fieldsV1:
      f:status:
        f:conditions: {}
        f:relatedObjects: {}
    manager: marketplace-operator
    operation: Update
    time: "2020-07-16T02:21:34Z"
  name: marketplace
  resourceVersion: "24582"
  selfLink: /apis/config.openshift.io/v1/clusteroperators/marketplace
  uid: 45aed17c-8c42-4471-83a2-e44efa6bd0f7
spec: {}
status:
  conditions:
  - lastTransitionTime: "2020-07-16T02:02:12Z"
    message: Marketplace is upgradeable
    reason: OperatorAvailable
    status: "True"
    type: Upgradeable
  - lastTransitionTime: "2020-07-16T02:01:52Z"
    message: Current CR sync ratio (0.9189189) meets the expected success ratio (0.3)
    reason: OperandTransitionsSucceeding
    status: "False"
    type: Degraded
  extension: null
  relatedObjects:
  - group: ""
    name: openshift-marketplace
    resource: namespaces
  - group: operators.coreos.com
    name: ""
    namespace: openshift-marketplace
    resource: OperatorSource
  - group: operators.coreos.com
    name: ""
    namespace: openshift-marketplace
    resource: CatalogSource


Expected results:
All conditions should be set. 

Additional info:
I think the root casue is here: https://github.com/operator-framework/operator-marketplace/blob/release-4.5/pkg/status/status.go#L339-L353

Comment 6 Kevin Rizza 2020-11-19 16:29:20 UTC
*** Bug 1899258 has been marked as a duplicate of this bug. ***

Comment 8 Jian Zhang 2020-11-23 06:44:10 UTC
Cluster version is 4.5.0-0.nightly-2020-11-22-160319

[root@preserve-olm-env data]# oc -n openshift-marketplace exec marketplace-operator-cb7bfcb4f-ft52l -- marketplace-operator --version
time="2020-11-23T03:40:06Z" level=info msg="Go Version: go1.13.15"
time="2020-11-23T03:40:06Z" level=info msg="Go OS/Arch: linux/amd64"
time="2020-11-23T03:40:06Z" level=info msg="operator-sdk Version: v0.8.0"
Marketplace source git commit: 9fac2afccae856d7d605321996ad6643c5c6b247

[root@preserve-olm-env data]# oc get co
...
machine-config                             4.5.0-0.nightly-2020-11-22-160319   True        False         False      53m
marketplace                                4.5.0-0.nightly-2020-11-22-160319   True        False         False      55m
monitoring                                 4.5.0-0.nightly-2020-11-22-160319   False       False         True       6m15s
network                                    4.5.0-0.nightly-2020-11-22-160319   True        False         False      60m
node-tuning                                4.5.0-0.nightly-2020-11-22-160319   True        False         False      60m
openshift-apiserver                        4.5.0-0.nightly-2020-11-22-160319   False       False         False      0s
openshift-controller-manager               4.5.0-0.nightly-2020-11-22-160319   True        False         False      53m

LGTM, verify it.

Comment 11 errata-xmlrpc 2020-12-01 10:48:48 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.5.21 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-2020:5194


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