Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-62980

Kubernetes credentials provider should attempt reconnect on KubernetesClientException

      If there is a network disruption that causes the k8s client to disconnect and stop listening for secrets the plugin stops updating. See the stack trace below for example.

      In the spirit of Kubernetes the plugin should keep trying to fix the problem until the issue goes away.

      Stack Trace:

      java.net.SocketException: Socket closed
      	at java.net.SocketInputStream.read(SocketInputStream.java:204)
      	...
      	at okio.AsyncTimeout$2.read(AsyncTimeout.java:237)
      Caused: java.net.SocketTimeoutException: timeout
      	at okio.Okio$4.newTimeoutException(Okio.java:232)
      	...
      	at okhttp3.RealCall.execute(RealCall.java:93)
      	...
      	at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleResponse(OperationSupport.java:354)
      	at io.fabric8.kubernetes.client.dsl.base.BaseOperation.listRequestHelper(BaseOperation.java:153)
      Caused: io.fabric8.kubernetes.client.KubernetesClientException: Operation: [list]  for kind: [Secret]  with name: [null]  in namespace: [ferris-wheel]  failed.
      	at io.fabric8.kubernetes.client.KubernetesClientException.launderThrowable(KubernetesClientException.java:64)
      	...
      	at io.fabric8.kubernetes.client.dsl.base.BaseOperation.list(BaseOperation.java:69)
      	at com.cloudbees.jenkins.plugins.kubernetes_credentials_provider.KubernetesCredentialProvider.startWatchingForSecrets(KubernetesCredentialProvider.java:108)
      	at com.cloudbees.jenkins.plugins.kubernetes_credentials_provider.KubernetesCredentialProvider.onClose(KubernetesCredentialProvider.java:228)
      	at io.fabric8.kubernetes.client.utils.WatcherToggle.onClose(WatcherToggle.java:56)
      	at io.fabric8.kubernetes.client.dsl.internal.WatchConnectionManager.closeEvent(WatchConnectionManager.java:380)
      	...
      	at java.lang.Thread.run(Thread.java:748)
      

          [JENKINS-62980] Kubernetes credentials provider should attempt reconnect on KubernetesClientException

          James Nord added a comment -

          pretty sure this is now working

          James Nord added a comment - pretty sure this is now working

            Unassigned Unassigned
            kylecronin Kyle Cronin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: