Red Hat Bugzilla – Bug 1471033
Sometime get "Failed to list templates/v1(undefined)" error in catalog console
Last modified: 2017-11-28 17:01:28 EST
Created attachment 1298226 [details]
Description of problem:
Enalbe service catalog in openshift-ansible then login to catalog console. Sometime can get error "Failed to list templates/v1(undefined)"
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Login catalog console and refresh the home page
1. Met error "Failed to list templates/v1(undefined)"
1. No errors
screenshot is attached
Created attachment 1298229 [details]
Also met something strange things. Sometime total=98, Sometime total=176. But actually there is 176 app. When total=98, there is no any error dialog.
The second issue is not an issue, the difference you are seeing is when you are viewing the top level "All" category versus the Languages -> All subcategory. Verified this on your server.
For the issue with templates failing to load. I'm not able to reproduce this against your server. In the cases where you see it can you please check the Network tab and see what the failure was on the request. I suspect you may be some hitting some kind of timeout. We have an existing bug tracking the fact that our OOTB templates for OCP results in a very large template request. See https://bugzilla.redhat.com/show_bug.cgi?id=1435174
Yes, I have read the slow bug before report this. catalog console really very sloooow every time when loading. But for this error, can't always reproduce, I just met about four times one day. Maybe they are same, When this happen again I'll check the Network tab and see what the failure was on the request.
Created attachment 1307366 [details]
template fail to load
checked again, and found that the response json for templates has additional content "This request caused apiserver to panic. Look in log for details."
The latest version I can reproduce this issue is:
# openshift version
that is a panic caused by a timeout. how many templates do you have loaded and how long do they take to list?
I remember 176 totally.
what is the average time to list, and size of listed data?
time oc get templates
oc get templates -o json > templates.json
ls -la templates.json
time oc get templates -n openshift
oc get templates -o json -n openshift > templates.json
ls -la templates.json
# oc get templates -n openshift -o json > templates.json
# ls -al templates.json
-rw-r--r--. 1 root root 4584324 Aug 4 13:12 templates.json
# ls -alh templates.json
-rw-r--r--. 1 root root 4.4M Aug 4 13:12 templates.json
The server timeout on list requests is 1 minute.
Listing multiple megabytes of templates over a slow connection can hit that timeout. When that happens, an error in the server log and in the client are expected.
We should fix the display of the error in the client (should not include "(undefined)")
- have the client remember template data instead of reloading it on every page change
- have the client only request template metadata ("Accept: application/json;as=Table;v=v1alpha1;g=meta.k8s.io" header and "?includeObject=Metadata" query parameter), available in 3.7
looks like the includeObject param has a bug (https://github.com/kubernetes/kubernetes/issues/50149), but it defaults to Metadata, which works for our purposes
The "(undefined)" message should be fixed by
We'll look at updating the web console to request template metadata only.
actually, PartialObjectMetadataList looks like exactly what the UI would want
Commit pushed to master at https://github.com/openshift/origin-web-console
Bug 1471033 - Only request template metadata
Bumps origin-web-common to 0.0.46
Bumps origin-web-catalog to 0.0.36
Only request template metadata when showing the catalog.
*** Bug 1435174 has been marked as a duplicate of this bug. ***
This bug is checked on OpenStack 3.7 env, error "Failed to list tempaltes/v1(undefined)" no longer shows up in web console
I would also double check this bug on OCP 3.7 envs built on other IaaS
Please also check the loading time for bug 1435174, which has comments exposing the underlying cause OOTB (https://bugzilla.redhat.com/show_bug.cgi?id=1435174#c7).
This bug depends on bug 1486623 for real service catalog env to check, IMO
# openshift version
template is loading via PartialObjectMetadataList now.
I extend the loading duration of templates to 9 min via network throttler to verify this bug.
Average loading time during testing
Move to VERIFIED as we verified templates get loaded via PartialObjectMetadataList and no errors found
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.