How to reduce the retry count for python client?
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- kubernetes, python
- Área
- api, networking
Línea de trabajo
Comienza con los puntos de entrada mostrados config.load_kube_config y CoreV1Api.list_pod_for_all_namespaces y, a continuación, sigue cómo el cliente realiza reintentos para un clúster inaccesible. Se considera que está terminado cuando el número de reintentos se puede configurar para este caso de uso y el comportamiento compatible está documentado o verificado con el ejemplo.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What happened (please include outputs or screenshots):
I am having a config file of a dead/deleted/inaccessible cluster.
I am trying to accessing the cluster using kubernetes-client-python.
By default kube-client retries it 3 times,
WARNING Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x00000000096E3860>: Failed to establish a new connection: [Errno 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond',)': /api/v1/pods
WARNING Retrying (Retry(total=1,....... /api/v1/pods
WARNING Retrying (Retry(total=0,....... /api/v1/pods
After 3 retries it throws an exception.
Is there any way to reduce the count.
Example Code
from kubernetes import client, config
config.load_kube_config(config_file='location-for-kube-config')
v1 = client.CoreV1Api()
ret = v1.list_pod_for_all_namespaces()
for i in ret.items:
print("%s\t%s\t%s" % (i.status.pod_ip, i.metadata.namespace, i.metadata.name))
What you expected to happen:
I need to configure the retry count for inaccessible/accessible k8s cluster.
How to reproduce it (as minimally and precisely as possible):
Delete the kubernetes cluster, then try to access the cluster using kubernetes-client-python.
By default it will perform retry for 3 times.
Anything else we need to know?:
Environment:
-
Kubernetes version (
kubectl version):
Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.3", GitCommit:"5e53fd6bc17c0dec8434817e69b04a25d8ae0ff0", GitTreeState:"clean", BuildDate:"2019-06-06T01:44:30Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"windows/amd64"}
Unable to connect to the server: dial tcp 149.129.128.208:6443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. -
OS: Windows 10
-
Python version (
python --version) : Python 2.7.14 -
Python client version (
pip list | grep kubernetes): kubernetes 10.0.1
- Lenguaje dominante
- Python
- Estrellas
- 7.7k
- Forks
- 3.5k
- Merge medio
- 1 d 14 h
- PR fusionados (30 d)
- 18
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de kubernetes-client/python
-
kind/bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 68/100
kubernetes-client/python#2280 · 16 comentarios · 9 reacciones ·
-
Release 1.37 Abierto
kubernetes-client/python#2691 · 1 comentario · 1 reacción · 1 asignado ·
-
Growing library size Abiertohelp wanted
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
kubernetes-client/python#2677 · 13 comentarios · 1 reacción ·
-
help wanted kind/feature
kubernetes-client/python#2602 · 6 comentarios · 1 asignado ·
-
kind/bug
kubernetes-client/python#2596 · 12 comentarios · 2 reacciones · 1 asignado ·
Todos los issues de kubernetes-client/python
Issues similares
-
bug confirmed issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
open-webui/open-webui#30750 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
OpenwaterHealth/openmotion-bloodflow-app#604 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
good first issue
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100