Bug 1967047

Summary: Console overview section shows operators are upgrading even though it is not actually upgrading.
Product: OpenShift Container Platform Reporter: Anandhu B Raj <abraj>
Component: Management ConsoleAssignee: Joe Caiani <jcaiani>
Status: CLOSED ERRATA QA Contact: Yanping Zhang <yanpzhan>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.7CC: aos-bugs, fgiloux, jcaiani, jokerman, msaud, nmukherj, rpalathi, yapei
Target Milestone: ---Flags: jcaiani: needinfo-
jcaiani: needinfo-
jcaiani: needinfo-
Target Release: 4.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Not taking into consideration the needs approval state Consequence: Console overview section shows operators are upgrading even though it is not actually upgrading. Fix: Analyze needs attention state to calculate final state Result: Provide needs attention state when applicable
Story Points: ---
Clone Of:
: 1990141 (view as bug list) Environment:
Last Closed: 2021-10-18 17:32:38 UTC Type: Bug
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:    
Bug Blocks: 1990141    

Comment 2 Frederic Giloux 2021-06-15 09:51:02 UTC
my customer hit the same issue, present on 4.6 and 4.7.
This can easily get reproduced, for instance:

$ oc new-project argocd-fred

$ cat operatorgroup.yaml 
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
  name: argocd-operators
  namespace: argocd-fred
spec:
  targetNamespaces:
  - argocd-fred
$ oc create -f operatorgroup.yaml

$ cat subscription.yaml 
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: argocd-operator
  namespace: argocd-fred 
spec:
  channel: alpha
  installPlanApproval: Manual
  name: argocd-operator
  source: community-operators 
  sourceNamespace: openshift-marketplace
  startingCSV: argocd-operator.v0.0.14
$ oc create -f subscription.yaml
(the latest version is v0.0.15)

$ oc get ip
NAME            CSV                       APPROVAL   APPROVED
install-c2kjm   argocd-operator.v0.0.14   Manual     false

$ oc patch installplan install-c2kjm -p '{"spec":{"approved":true}}' --type merge

Overview page:
Operators: 1 updating
Argo CD: 1 project upgrading

Installed Operators page:
Name           Status
Argo CD        Succeeded / Upgrade available

The same information should be displayed in the Overview page.

Comment 4 Yanping Zhang 2021-06-23 09:53:43 UTC
Checked on ocp 4.9 cluster with payload 4.9.0-0.nightly-2021-06-22-193627
1. Create etcd subscription in project with approval strategy manual and selecting an old version.
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: etcd
  namespace: default
spec:
  channel: singlenamespace-alpha
  installPlanApproval: Manual
  name: etcd
  source: community-operators
  sourceNamespace: openshift-marketplace
  startingCSV: etcdoperator.v0.9.2
2. After the etcdoperator.v0.9.2 is installed, there are upgrade available info shown on subscription page.
3. Check "Status" card on Overview page, the "Operators" still shows "1 updating", and there is "etcd 1 project upgrade available" in popover. The info on popover is acceptable, but the icon is an updating icon, and the "1 updating" is not suitable.

Comment 7 Yanping Zhang 2021-07-15 04:21:20 UTC
Checked on ocp 4.9 cluster with payload 4.9.0-0.nightly-2021-07-14-204159.
Install strimzi operator, choose version 0.19.0 and manual approval strategy, then switch channel to strimzi-0.20.x, now there is update available. Check status card on overview page, in Operators field the upgrade info and icon are shown correctly.

Comment 8 Frederic Giloux 2021-07-16 05:44:27 UTC
@jcaiani Could you port the fix back to 4.7?

Comment 10 Joe Caiani 2021-08-04 20:25:40 UTC
@fgiloux backporting to 4.8 -> 4.7

Comment 14 errata-xmlrpc 2021-10-18 17:32:38 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.9.0 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:3759