[JIRA] (JENKINS-52958) Slave pod is not removed when a job is finished

632 views
Skip to first unread message

filipbrychta@gmail.com (JIRA)

unread,
Aug 9, 2018, 6:24:01 AM8/9/18
to jenkinsc...@googlegroups.com
Filip Brychta created an issue
 
Jenkins / Bug JENKINS-52958
Slave pod is not removed when a job is finished
Issue Type: Bug Bug
Assignee: Carlos Sanchez
Attachments: agent.log, master-okhttp3.log, master.log
Components: kubernetes-plugin
Created: 2018-08-09 10:23
Environment: Jenkins ver. 2.121.2
Kubernetes plugin 1.12.2
OpenShift Master:
    v3.9.30
Kubernetes Master:
    v1.9.1+a0ce1bc657
OpenShift Web Console:
    v3.9.30
Priority: Minor Minor
Reporter: Filip Brychta

Slave pod is correctly created and agent is connected with jenkins master:

Aug 09, 2018 8:49:49 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connected

When the job is done the plugin tries to terminate the slave:
Aug 09, 2018 4:50:55 AM INFO org.csanchez.jenkins.plugins.kubernetes.KubernetesSlave _terminate
Terminating Kubernetes instance for agent jenkins-slave-centos-base-8ffg2

but it fails with:
Aug 09, 2018 4:50:55 AM WARNING jenkins.slaves.DefaultJnlpSlaveReceiver channelClosed
Computer.threadPoolForRemoting 760 for jenkins-slave-centos-base-8ffg2 terminated java.nio.channels.ClosedChannelException

 

Agent tries to re-connect which fails:

Aug 09, 2018 8:50:55 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Terminated
Aug 09, 2018 8:51:05 AM jenkins.slaves.restarter.JnlpSlaveRestarterInstaller$FindEffectiveRestarters$1 onReconnect

.....

INFO: [JNLP4-connect connection to jenkins2.bc.jonqe.lab.eng.bos.redhat.com/10.16.23.71:37355] Local headers refused by remote: Unknown client name: jenkins-slave-centos-base-8ffg2
Aug 09, 2018 8:51:08 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Protocol JNLP4-connect encountered an unexpected exception
java.util.concurrent.ExecutionException: org.jenkinsci.remoting.protocol.impl.ConnectionRefusalException: Unknown client name: jenkins-slave-centos-base-8ffg2

 

Result is that job is successful but the slave pod is not removed and stays there with Error status: Terminated at Aug 9, 2018 10:51:09 AM with exit code 255 (Error)

 

Note that I'm only running the jnlp container in the pod.

Full jenkins master and agent logs are attached. Note that 4 hours difference in master and agent logs are only because master logs are taken from browser so it used local timezone.

 

 

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)

arne-jenkins@kepp.net (JIRA)

unread,
Aug 15, 2018, 3:37:02 PM8/15/18
to jenkinsc...@googlegroups.com
Arne Kepp commented on Bug JENKINS-52958
 
Re: Slave pod is not removed when a job is finished

FWIW:

Jenkins 2.134 was working fine until I did a big round of plugin updates, which included kubernetes plugin 1.12.  (Upgrading to Jenkins 2.138 did not make a difference.)

After downgrading to kubernetes plugin 1.7.1 everything appears to be fine and dandy again (not tested exhaustively), except the resulting CSRF issue of course.

arne-jenkins@kepp.net (JIRA)

unread,
Aug 15, 2018, 3:38:01 PM8/15/18
to jenkinsc...@googlegroups.com
Arne Kepp edited a comment on Bug JENKINS-52958
FWIW:

Jenkins 2.134 was working fine until I did a big round of plugin updates, which included kubernetes plugin 1.12.  (Upgrading to Jenkins 2.138 did not
make a difference improve the situation .)


After downgrading to kubernetes plugin 1.7.1 everything appears to be fine and dandy again (not tested exhaustively), except the resulting CSRF issue of course.

jonas.buettner@spring-media.de (JIRA)

unread,
Dec 14, 2018, 11:07:02 AM12/14/18
to jenkinsc...@googlegroups.com

Also with Jenkins ver. 2.150.1 and Kubernetes plugin   1.13.7

Configuration: 

Pod Retention = Always

Time in minutes to retain agent when idle = 5

Result:

Pod Status after Agent remove = Terminated: Completed

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

jglick@cloudbees.com (JIRA)

unread,
Jul 16, 2019, 3:43:37 PM7/16/19
to jenkinsc...@googlegroups.com
Jesse Glick assigned an issue to Unassigned
 
Change By: Jesse Glick
Assignee: Carlos Sanchez
Reply all
Reply to author
Forward
0 new messages