Bug 1999823 - Admin web-console should linkify ClusterVersion and ClusterOperator condition messages
Summary: Admin web-console should linkify ClusterVersion and ClusterOperator condition...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.8
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 4.9.0
Assignee: Samuel Padgett
QA Contact: Xiyun Zhao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-08-31 18:42 UTC by W. Trevor King
Modified: 2021-10-18 17:50 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-10-18 17:50:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 9955 0 None None None 2021-08-31 18:59:42 UTC
Red Hat Product Errata RHSA-2021:3759 0 None None None 2021-10-18 17:50:56 UTC

Description W. Trevor King 2021-08-31 18:42:59 UTC
Seen in an 4.8+PR test cluster, there are a few locations where we could have URIs and where linkifying those URIs would make a cluster-admin's life more convenient:

* Condition messages on the ClusterVersion page ( /k8s/cluster/config.openshift.io~v1~ClusterVersion/version ).
* Condition messages on the ClusterOperator pages ( e.g. /settings/cluster/clusteroperators and /k8s/cluster/config.openshift.io~v1~ClusterOperator/authentication )
* Alert mesasges on the alert-detail page ( e.g. /monitoring/alerts/2572597522?alertname=ClusterNotUpgradeable&condition=Upgradeable&endpoint=metrics&name=version&severity=warning )

Convenient reproducer:

$ cat co.yaml 
apiVersion: config.openshift.io/v1
kind: ClusterOperator
metadata:
  name: testing
spec: {}
$ oc apply -f co.yaml
$ oc proxy &  # working around the lack of --subresource: https://github.com/kubernetes/kubernetes/pull/99556
[1] 16920
Starting to serve on 127.0.0.1:8001
$ curl -k -XPATCH -H "Accept: application/json" -H "Content-Type: application/json-patch+json" 'http://127.0.0.1:8001/apis/config.openshift.io/v1/clusteroperators/testing/status' -d '[{"op": "add", "path": "/status", "value": {"conditions": [{"lastTransitionTime": "2021-08-31T01:01:01Z", "type": "Available", "status": "False", "reason": "Testing", "message": "Testing available https://example.com/a."}, {"lastTransitionTime": "2021-08-31T01:01:01Z", "type": "Degraded", "status": "True", "reason": "Testing", "message": "Testing degraded https://example.com/a."}, {"lastTransitionTime": "2021-08-31T01:01:01Z", "type": "Upgradeable", "status": "False", "reason": "Testing", "message": "Testing upgradeable https://example.com/a."}]}}]'
$ fg
oc proxy
^C

Then look at:

* The four messages on the ClusterOperator detail page:

  ${CONSOLE}/k8s/cluster/config.openshift.io~v1~ClusterOperator/testing

  The summary under Status (with the degraded message string), and the three condition messages.

* The summary for the 'testing' row in the ClusterOperator list page:

  ${CONSOLE}/settings/cluster/clusteroperators

* The conditions on the ClusterVersion detail page:

  ${CONSOLE}/k8s/cluster/config.openshift.io~v1~ClusterVersion/version

* The two messages on the ClusterNotUpgradeable alert-detail page:

  Linked from: ${CONSOLE}/monitoring/alerts?rowFilter-alert-source=platform&resource-list-text=ClusterOperatorDown

The sidebar alert message is already linkified today, although you'll have to wait a few minutes for the alert to start firing before it shows up in the sidebar.

Comment 3 Xiyun Zhao 2021-09-03 00:56:02 UTC
This bug has been fixed and verified on payload 4.9.0-0.nightly-2021-09-01-193941

Verification steps (Following report steps):
1. Login OCP command line
2. Apply co.yaml file, and then execute the 
   $ cat co.yaml 
       apiVersion: config.openshift.io/v1
       kind: ClusterOperator
       metadata:
          name: testing
       spec: {}
   $ oc apply -f co.yaml
   $ oc proxy

   # Exectue below command on another tab
   $ curl -k -XPATCH -H "Accept: application/json" -H "Content-Type: application/json-patch+json" 'http://127.0.0.1:8001/apis/config.openshift.io/v1/clusteroperators/testing/status' -d '[{"op": "add", "path": "/status", "value": {"conditions": [{"lastTransitionTime": "2021-08-31T01:01:01Z", "type": "Available", "status": "False", "reason": "Testing", "message": "Testing available https://example.com/a."}, {"lastTransitionTime": "2021-08-31T01:01:01Z", "type": "Degraded", "status": "True", "reason": "Testing", "message": "Testing degraded https://example.com/a."}, {"lastTransitionTime": "2021-08-31T01:01:01Z", "type": "Upgradeable", "status": "False", "reason": "Testing", "message": "Testing upgradeable https://example.com/a."}]}}]'
   $ fg
     oc proxy
3. Go back to OCP console
4. Verify if the link on below list page is clickable
   * The summary under Status(with the degraded message string), messages on the ClusterOperator detail page part, and message under condition's part
     ${CONSOLE}/k8s/cluster/config.openshift.io~v1~ClusterOperator/testing
   * The Message column for the 'testing' in ClusterOperator list page
     ${CONSOLE}/settings/cluster/clusteroperators
   * The message on conditions part on ClusterVersion detail page 
     ${CONSOLE}/k8s/cluster/config.openshift.io~v1~ClusterVersion/version
   * The messages on the ClusterOperatorDown alert-detail page:
     Linked from: ${CONSOLE}/monitoring/alerts?rowFilter-alert-source=platform&resource-list-text=ClusterOperatorDown

Result:
4. All link is clickable

Comment 6 errata-xmlrpc 2021-10-18 17:50:49 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


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