Bug 1654184 - Messages in oc client logs is useless and lower response
Summary: Messages in oc client logs is useless and lower response
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.1.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: Juan Vallejo
QA Contact: Xingxing Xia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-28 08:25 UTC by Yadan Pei
Modified: 2019-03-12 14:25 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-28 15:47:28 UTC
Target Upstream Version:


Attachments (Terms of Use)

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


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