Description of problem:
Console always send requests to api/kubernetes/apis/, basically can reach 1000 requests every minute. This makes the console webpage particularly much slower than usual.
From developer console, it shows following error:
Failed to load resource: the server responded with a status of 503 (Service Unavailable)
operator-group.tsx:51 Error: Call to api/kubernetes/apis timed out after 20000ms.
at new t (operator-group.tsx:51)
$ oc api-resources --api-group=quota.openshift.io
NAME SHORTNAMES APIGROUP NAMESPACED KIND
error: unable to retrieve the complete list of server APIs: quota.openshift.io/v1: the server is currently unable to handle the request
Not sure frequently requested issue if it's caused by the unavailable service.
If so, the console should have a way to bypass effect influence from unavailable service
Version-Release number of selected component (if applicable):
Cluster version is 4.0.0-0.nightly-2019-04-05-165550
Steps to Reproduce:
1. as above described
Should not always send the request to api/kubernetes/apis/
console commits: 87cf25b49a98ef8d813c557ad4b74f0d18bc7d15
Effect more pages on same version:
When user created and subscribed an Etcd operator, check the "All Instance" page from Etcd operator detail page, it keeps requesting in loop. Please check the below pages:
All Instances (url: k8s/ns/openshift-operators/clusterserviceversions/etcdoperator.v0.9.4-clusterwide/instances)
etcd Cluster (url: k8s/ns/openshift-operators/clusterserviceversions/etcdoperator.v0.9.4-clusterwide/etcd.database.coreos.com~v1beta2~EtcdCluster)
etcd Backup (url: k8s/ns/openshift-operators/clusterserviceversions/etcdoperator.v0.9.4-clusterwide/etcd.database.coreos.com~v1beta2~EtcdBackup)
etcd Restore (url: k8s/ns/openshift-operators/clusterserviceversions/etcdoperator.v0.9.4-clusterwide/etcd.database.coreos.com~v1beta2~EtcdRestore)
This is caused by bug 1696387 where the quota API resource returns errors during discovery. We should change the console to tolerate it better, however.
Bug 1697225 is also a symptom of this bug because it triggers re-render of the secret page, losing state.
Sam, any workaround for this issue? This console has been too slow to hard use. Hope the original issue could be fixed ASAP.
We have a basic fix in https://github.com/openshift/console/pull/1404. A workaround in the meantime is to log in with a normal user instead of kubeadmin. You shouldn't see the problem if you don't have authority to watch APIServices.
The problem should disappear entirely now that https://github.com/openshift/origin/pull/22425 has merged.
We're still working on making console more robust when an APIService is misbehaving.
Two fixes merged to address this. One that fixes the cause in master:
And another that makes the console more tolerant of misbehaving API services:
Now the console runs once API service discovery every 30s, around 120 requests per minute.
Verified this bug.
console image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:1f2ceacf044e29e75c488e5e641598015b2fff97274ab898409be5e020fea029