Description of problem: Occasional error - the server doesn't have a resource type "dc" when using --request-timeout Related bugs: bug 1529482, bug 1538488 and bug 1577520 that show same error "the server doesn't have a resource type" but have different fix PRs. Version-Release number of selected component (if applicable): $ oc version oc v3.10.0-0.50.0 kubernetes v1.10.0+b81c8f8 ... Server https://...:8443 openshift v3.10.0-0.50.0 ... How reproducible: Occasional Steps to Reproduce: 1. oc login, create project and: $ oc new-app openshift/hello-openshift Then wait for the deployment to complete. 2. Wait some time [1]. Then use --request-timeout: $ oc scale dc hello-openshift --replicas=2 --request-timeout=1ms [1] Must wait some time to reproduce it, though not sure the precise time. The scenario when I reproduce it: After step 1 I turned to do other work. About 10 mins later I came back and did step 2, which met this. If the waiting time is short (e.g. 2~5 mins), step 2 can get the error prompt in Expected results. It looks like 10 mins of waiting time can reproduce the bug easily. Actual results: 2. It prints "CancelRequest not implemented" which may be intended. This is not the concern of the bug. The bug concerns: it prints confusing prompt 'the server doesn't have a resource type "dc"': E0523 16:39:09.592359 16337 round_trippers.go:291] CancelRequest not implemented E0523 16:39:09.593622 16337 round_trippers.go:291] CancelRequest not implemented E0523 16:39:09.594984 16337 round_trippers.go:291] CancelRequest not implemented error: the server doesn't have a resource type "dc" Expected results: 2. Always give clear prompt. E.g. sometimes the command prints prompt which is normal: Unable to connect to the server: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers) Additional info: More log info with --v=6: $ oc scale dc hello-openshift --replicas=2 --request-timeout=1ms --v=6 I0523 15:59:14.935594 15918 loader.go:357] Config loaded from file /home/xxia/.kube/config E0523 15:59:14.937309 15918 round_trippers.go:375] CancelRequest not implemented I0523 15:59:14.937366 15918 round_trippers.go:405] GET https://$MASTER/api?timeout=1ms in 1 milliseconds I0523 15:59:14.937856 15918 cached_discovery.go:124] skipped caching discovery info due to Get https://$MASTER/api?timeout=1ms: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers) E0523 15:59:14.939066 15918 round_trippers.go:375] CancelRequest not implemented I0523 15:59:14.939120 15918 round_trippers.go:405] GET https://$MASTER/api?timeout=1ms in 1 milliseconds I0523 15:59:14.939202 15918 cached_discovery.go:124] skipped caching discovery info due to Get https://$MASTER/api?timeout=1ms: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers) E0523 15:59:14.940468 15918 round_trippers.go:375] CancelRequest not implemented I0523 15:59:14.940521 15918 round_trippers.go:405] GET https://$MASTER/api?timeout=1ms in 1 milliseconds I0523 15:59:14.940611 15918 cached_discovery.go:124] skipped caching discovery info due to Get https://$MASTER/api?timeout=1ms: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers) I0523 15:59:14.940684 15918 factory_object_mapping.go:92] Unable to retrieve API resources, falling back to hardcoded types: Get https://$MASTER/api?timeout=1ms: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers) F0523 15:59:14.940924 15918 helpers.go:119] error: the server doesn't have a resource type "dc"
Hm, this appears to be the same as https://bugzilla.redhat.com/show_bug.cgi?id=1577520. When there is no connection to the server, the original error is getting squashed by the restmapper error. This should be fixed in the next rebase. *** This bug has been marked as a duplicate of bug 1577520 ***