Pods are not terminating properly

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      Recently i've upgraded the plugin to 1.12.2 and started to face issues with idle agents termination.

      It looks like when jenkins decides to remove the k8s agent (according to retention policy) it disconnects the computer, but leaves the pod as it is.
      Thats why after some time the pod ends up in "Error" state since connection to agent is broken.

      Corresponding logs here: 

      2018-09-05 21:42:58.121+0000 [id=212] INFO o.c.j.p.k.KubernetesSlave#_terminate: Terminating Kubernetes instance for agent test-r4q15
      2018-09-05 21:42:58.122+0000 [id=212] FINE o.c.j.p.k.KubernetesCloud#connect: Building connection to Kubernetes kubernetes URL  namespace nstest
      2018-09-05 21:42:58.124+0000 [id=212] FINE o.c.j.p.k.KubernetesFactoryAdapter#createClient: Configuring Kubernetes client from kubeconfig file
      2018-09-05 21:42:58.134+0000 [id=212] FINE o.c.j.p.k.KubernetesFactoryAdapter#createClient: Creating Kubernetes client: KubernetesFactoryAdapter [serviceAddress=, namespace=nstest, caCertData=null, credentials=org.jenkinsci.plugins.plaincredentials.impl.FileCredentialsImpl@123, skipTlsVerify=false, connectTimeout=0, readTimeout=0]
      2018-09-05 21:42:58.140+0000 [id=212] FINE o.c.j.p.k.KubernetesCloud#connect: Connected to Kubernetes kubernetes URL 

      From the code perspective it looks like nothing happens next to this line: https://github.com/jenkinsci/kubernetes-plugin/blob/kubernetes-1.12.2/src/main/java/org/csanchez/jenkins/plugins/kubernetes/KubernetesSlave.java#L245

            Assignee:
            Carlos Sanchez
            Reporter:
            Alex Medvedev
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: