Bug 1654184

Summary: Messages in oc client logs is useless and lower response
Product: OpenShift Container Platform Reporter: Yadan Pei <yapei>
Component: ocAssignee: Juan Vallejo <jvallejo>
Status: CLOSED NOTABUG QA Contact: Xingxing Xia <xxia>
Severity: low Docs Contact:
Priority: medium    
Version: 4.1.0CC: aos-bugs, jokerman, mmccomas, yapei
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-11-28 15:47:28 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:

Description Yadan Pei 2018-11-28 08:25:05 UTC
Description of problem:
'oc get all' take more time to get response and there is error "no kind is registered for the type v1beta1.Table in scheme "k8s.io/kubernetes/pkg/api/legacyscheme/scheme.go:29"

Version-Release number of selected component (if applicable):
oc v4.0.0-0.74.0
kubernetes v1.11.0+d4cacc0
features: Basic-Auth GSSAPI Kerberos SPNEGO


How reproducible:
Always

Steps to Reproduce:
1.oc get all --loglevel=5
[yapei@console ~]$ oc get all --loglevel=5 
I1128 15:15:29.563838   15056 discovery.go:215] Invalidating discovery information
I1128 15:15:54.528950   15056 get.go:443] no kind is registered for the type v1beta1.Table in scheme "k8s.io/kubernetes/pkg/api/legacyscheme/scheme.go:29"
NAME                                    READY     STATUS    RESTARTS   AGE
pod/console-operator-7c98cc9ff9-l86g6   1/1       Running   0          1d

I1128 15:15:54.529170   15056 get.go:443] no kind is registered for the type v1beta1.Table in scheme "k8s.io/kubernetes/pkg/api/legacyscheme/scheme.go:29"
NAME                               DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/console-operator   1         1         1            1           1d

I1128 15:15:54.529419   15056 get.go:443] no kind is registered for the type v1beta1.Table in scheme "k8s.io/kubernetes/pkg/api/legacyscheme/scheme.go:29"
NAME                                          DESIRED   CURRENT   READY     AGE
2.Compared to oc v4.0.0-0.74.0, use oc v4.0.0-0.66.0 for this step
[root@hp-sl390s-01 installer]# oc get all --loglevel=5
I1128 02:18:51.517444   14225 discovery.go:215] Invalidating discovery information
I1128 02:18:51.916373   14225 get.go:443] no kind is registered for the type v1beta1.Table in scheme "k8s.io/kubernetes/pkg/api/legacyscheme/scheme.go:29"
NAME                                    READY     STATUS    RESTARTS   AGE
pod/catalog-operator-57fd77c575-zmv7z   1/1       Running   2          3h
pod/olm-operator-567d7cc597-s76kc       1/1       Running   2          3h
pod/package-server-646f8d7fbc-5lwp9     1/1       Running   2          3h

I1128 02:18:51.916674   14225 get.go:443] no kind is registered for the type v1beta1.Table in scheme "k8s.io/kubernetes/pkg/api/legacyscheme/scheme.go:29"
NAME                     TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)   AGE
service/package-server   ClusterIP   172.30.229.120   <none>        443/TCP   3h

I1128 02:18:51.916853   14225 get.go:443] no kind is registered for the type v1beta1.Table in scheme "k8s.io/kubernetes/pkg/api/legacyscheme/scheme.go:29"
NAME                               DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/catalog-operator   1         1         1            1           3h
deployment.apps/olm-operator       1         1         1            1           3h
deployment.apps/package-server     1         1         1            1           3h

I1128 02:18:51.917103   14225 get.go:443] no kind is registered for the type v1beta1.Table in scheme "k8s.io/kubernetes/pkg/api/legacyscheme/scheme.go:29"
NAME                                          DESIRED   CURRENT   READY     AGE
replicaset.apps/catalog-operator-57fd77c575   1         1         1         3h
.....snipped....


Actual results:
1. 'oc get all' takes approximately 30 seconds to return the result
2. 'oc get all' returns result quickly
for both versions, there is an error "no kind is registered for the type v1beta1.Table in scheme "k8s.io/kubernetes/pkg/api/legacyscheme/scheme.go:29"

Expected results:
1. It should not take a so long time to return result 

Additional info:

Comment 1 Juan Vallejo 2018-11-28 15:47:28 UTC
As of release 3.12, `oc get` makes use of server-side printing by default [1]. This means that instead of having the server send back a list of api resources, it instead sends back a "Table" object containing the columns and rows for `oc` to display. The error you are seeing is logged here [2]. In order to maintain compatibility between newer clients against servers that don't send back a Table object, `oc get` treats the object sent back from the server as a non-Table object, which it must convert to an internal version before printing. For newer servers that do reply back with a Table object, this conversion will always fail. Because we cannot guarantee that the error returned will always be caused by a Table object (it could be that we are talking to an old server which replied with a PodList, for example, and that conversion failed for some other reason), we have chosen to keep that log there.

That conversion will be removed altogether in a future version once we no longer need to support old servers that might reply with a non-Table response.


1. https://kubernetes.io/docs/reference/kubectl/overview/#server-side-columns
2. https://github.com/openshift/origin/blob/master/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/get/get.go#L443

Comment 2 Yadan Pei 2018-11-29 01:35:28 UTC
Thank you Juan