Bug 1785093 - Console shows 'Error retrieving' in Update Status even upgrade is in progress [openshift-4.4]
Summary: Console shows 'Error retrieving' in Update Status even upgrade is in progress...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.4.0
Assignee: Robb Hamilton
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks: 1797755 1797756 1797758
TreeView+ depends on / blocked
 
Reported: 2019-12-19 06:20 UTC by Yadan Pei
Modified: 2020-05-04 11:21 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
: 1797755 (view as bug list)
Environment:
Last Closed: 2020-05-04 11:20:43 UTC
Target Upstream Version:
rhamilto: needinfo-


Attachments (Terms of Use)
UpdateStatus (410.41 KB, image/png)
2020-02-04 01:55 UTC, Yadan Pei
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 4161 0 None closed Bug 1785093: Fix bug where Upgrade Status is incorrect 2021-02-08 10:14:36 UTC
Red Hat Product Errata RHBA-2020:0581 0 None None None 2020-05-04 11:21:18 UTC

Description Yadan Pei 2019-12-19 06:20:59 UTC
Description of problem:
on Cluster Settings page, Update Status displays 'Error retrieving' status even an upgrade is in progress

Version-Release number of selected component (if applicable):
4.2.12

How reproducible:
Always

Steps to Reproduce:
1. Do a force upgrade from 4.2.12 to 4.3 nightly
$ oc adm upgrade --to-image registry.svc.ci.openshift.org/ocp/release:4.3.0-0.nightly-2019-12-18-224446 --force --allow-explicit-upgrade=true
2. Check Cluster Settings page -> Overview
3. Check Cluster Settings page -> Cluster Operators

Actual results:
2. It shows 'Error retrieving' 
3. It shows 'Cluster update in progress, working towards .....'

Expected results:
2. Update Status better show current update status when an upgrade is already in progress, not 'Error retrieving' , else the upgrade is going silently and user will not notice 

Additional info:

Comment 1 Yadan Pei 2019-12-19 06:22:58 UTC
Steps to Reproduce:
1. Do a force upgrade from 4.2.12 to 4.3 nightly without changing default configuration of ClusterVersion
$ oc adm upgrade --to-image registry.svc.ci.openshift.org/ocp/release:4.3.0-0.nightly-2019-12-18-224446 --force --allow-explicit-upgrade=true
2. Check Cluster Settings page -> Overview
3. Check Cluster Settings page -> Cluster Operators

Comment 2 Yadan Pei 2019-12-19 06:26:55 UTC
http://g.recordit.co/rwALTQZmSj.gif   Not sure if everyone can open it, but please refresh and try in different browsers if you can't open it(we confirmed it works after retry, in different browser)

Comment 6 Yadan Pei 2020-02-04 01:53:52 UTC
Hi Robb

I did an upgrade from 4.4.0-0.nightly-2020-02-02-225006 to 4.4.0-0.nightly-2020-02-03-043955

and Update Status on Cluster Settings page is showing correct status, but attached PR #4161 is still open, does other PR fixed the issue?

Comment 7 Yadan Pei 2020-02-04 01:55:11 UTC
Created attachment 1657459 [details]
UpdateStatus

Comment 8 Yadan Pei 2020-02-04 01:56:50 UTC
Or do I need to verify the bug during a 4.2 -> 4.4 upgrade? It sounds unreasonable

Comment 10 Robb Hamilton 2020-02-04 13:56:06 UTC
> Or do I need to verify the bug during a 4.2 -> 4.4 upgrade? It sounds unreasonable

No.  In fixing the bug, I noticed it occurs in all versions.  And with the bug back porting process, it made the most sense to update this bug to cover the current version and then clone it to cover the previous versions so the dependency chain is easily created.

Prior to the fix, the bug occurs any time the RetrievedUpdates Condition at k8s/cluster/config.openshift.io~v1~ClusterVersion/version is false.  This can be easily replicated by editing Cluster Version spec.upstream to an invalid value (e.g., https://bogus.openshift.com/api/upgrades_info/v1/graph) at k8s/cluster/config.openshift.io~v1~ClusterVersion/version/yaml and then following your steps to reproduce.  The bug was occurring because code was returning 'Error retrieving' before 'Cluster update in progress, working towards .....', thus never showing an update was in progress.

Comment 11 Yadan Pei 2020-02-06 05:50:19 UTC
1. patch clusterversion/version to an invalid value
$ oc patch clusterversion version --type='json' -p='[{"op": "replace", "path": "/spec/upstream", "value":"https://testopenshift-release.svc.ci.openshift.org/graph"}]'
clusterversion.config.openshift.io/version patched

2. Update Status will show 'Failing', click 'view details' will show detail error message
3. upgrade the cluster to a new 4.4
$ oc adm upgrade --to-image registry.svc.ci.openshift.org/ocp/release:4.4.0-0.nightly-2020-02-05-234656 --force  --allow-explicit-upgrade
$ oc get clusterversion 
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.4.0-0.nightly-2020-02-05-211857   True        True          49s     Working towards 4.4.0-0.nightly-2020-02-05-234656: 15% complete
4. Update Status in Cluster Settings also show ' Working towards 4.4.0-0.nightly-2020-02-05-234656: N% complete', click 'View details' will redirect user to Cluster Operators tab, there is also update message there


Verified on     4.4.0-0.nightly-2020-02-05-211857

Comment 13 errata-xmlrpc 2020-05-04 11:20:43 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-2020:0581


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