-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
api request hang and stuck #1740
Comments
It's hard to tell what went wrong from the error message along. It's a networking connection issue. If you could manually reproduce the issue or provide more details we may be able to help more. |
We expirience a similar (and reporducable) problem with read_namespaced_stateful_set
the call to read_namespaced_stateful_set never returns |
Does the server respond if you call a different API, or use kubectl inside the pod? Would be usefully if we can capture the HTTP requests (using debug logging for this client, and |
Tried the debug option and it hep me understand that
2022-03-31 05:20:40,915 - yowza.yapi.k8s.k8s_cluster_facade(140490894980928) - k8s_cluster_facade.py:544 - INFO - call read_namespaced_stateful_set |
Thanks @aviresonai! Interesting, not sure if @geotransformer hit the same issue.
That is almost certainly a similar issue to kubernetes-client/gen#52. Reading the k8s API, it looks like the field used to be optional, but in kubernetes/kubernetes#104045 it was changed to be a required field. However the API server may still return a statefulset with this field missing, which fails the openapi-generated client-side validation. Typically we fix this kind of issues by marking the field optional in k8s API. Would you mind opening an issue/PR in k8s? |
Thanks @roycaihw , I am not sure how to describe this as n API error (the API version we use is older then the client and at that time this field was not mandatory) yet , working with older versions of the API seems like a requirment for the client library not for the API |
The fix will be in the upstream openapi spec, and eventually land in this python client. You're correct that we won't change the server's behavior. Here is an example: kubernetes/kubernetes#64996 |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What happened (please include outputs or screenshots):
ubuntu@xxxx-control-plane-1:~ kubectl logs -n foo xxx-controller-bc4db5d46-h594h
2022-03-10 23:43:49.065 INFO main: Check Apiserver connection
2022-03-10 23:43:51.946 WARNING urllib3.connectionpool: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f4d5a8d3630>: Failed to establish a new connection: [Errno 113] No route to host',)': /apis/apiextensions.k8s.io/v1/
ubuntu@xxxx-control-plane-1:~
What you expected to happen:
ubuntu@xxxx-control-plane: kubectl logs xxx-controller-5696b686fb-c5tb5 --previous
2022-02-27 19:37:30.000 INFO main: Check Apiserver connection
2022-02-27 19:37:32.251 WARNING urllib3.connectionpool: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7faacf65b6d8>: Failed to establish a new connection: [Errno 113] No route to host',)': /apis/apiextensions.k8s.io/v1/
2022-02-27 19:37:35.323 WARNING urllib3.connectionpool: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7faacf65b7f0>: Failed to establish a new connection: [Errno 113] No route to host',)': /apis/apiextensions.k8s.io/v1/
2022-02-27 19:37:38.395 WARNING urllib3.connectionpool: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7faacf65b898>: Failed to establish a new connection: [Errno 113] No route to host',)': /apis/apiextensions.k8s.io/v1/
2022-02-27 19:37:41.467 ERROR main: Exception when calling ApiextensionsV1Api->get_api_resources: HTTPSConnectionPool(host='10.96.0.1', port=443): Max retries exceeded with url: /apis/apiextensions.k8s.io/v1/ (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7faacf65b978>: Failed to establish a new connection: [Errno 113] No route to host',))
How to reproduce it (as minimally and precisely as possible):
Happened intermittently, Cannot reproduce it manually. Only happens in automation testing in a multi-nodes k8s cluster
Anything else we need to know?:
Environment:
kubectl version
): 1.21python --version
) 3.6pip list | grep kubernetes
)root@xxx-bc4db5d46-h594h:/opt/run/server# pip list | grep kube
kubernetes 21.7.0
WARNING: You are using pip version 21.0.1; however, version 21.3.1 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.
The text was updated successfully, but these errors were encountered: