Bug 1999823
| Summary: | Admin web-console should linkify ClusterVersion and ClusterOperator condition messages | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | W. Trevor King <wking> |
| Component: | Management Console | Assignee: | Samuel Padgett <spadgett> |
| Status: | CLOSED ERRATA | QA Contact: | Xiyun Zhao <xiyuzhao> |
| Severity: | low | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 4.8 | CC: | aos-bugs, jokerman, spadgett, yapei |
| Target Milestone: | --- | ||
| Target Release: | 4.9.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | No Doc Update | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2021-10-18 17:50:49 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: | |||
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
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 |
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.