Hi,

While writing the Kubernetes plugin, a plugin to dynamically start slaves 
in Kubernetes (something similar to the Docker one) I am getting 
EOFException when deleting the Pod (the container running the jenkins-slave 
jar)

The code for _terminate

            cloud.connect().deletePod(name, cloud.getNamespace());
            LOGGER.log(Level.INFO, "Terminated Kubernetes instance for 
slave {0}", name);
            toComputer().disconnect(OfflineCause.create(new 
Localizable(HOLDER, "offline")));
            LOGGER.log(Level.INFO, "Disconnected computer {0}", name);

https://github.com/jenkinsci/kubernetes-plugin/blob/master/src/main/java/org/csanchez/jenkins/plugins/kubernetes/KubernetesSlave.java#L75

I have tried in the reverse order, disconnect, then deletePod with the same 
result, even adding a sleep() call between both
I'm not sure what am I missing, if I should call something else to close 
the slave connection


Aug 26, 2015 4:19:17 PM 
org.csanchez.jenkins.plugins.kubernetes.KubernetesSlave _terminate
INFO: Terminating Kubernetes instance for slave 
f911b094-2674-4645-b066-f28726e4b3d8
Aug 26, 2015 4:19:17 PM hudson.remoting.AbstractByteArrayCommandTransport$1 
handle
WARNING: Failed to construct Command
java.io.EOFException
at 
java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2328)
at 
java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2797)
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:802)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:299)
at hudson.remoting.ObjectInputStreamEx.<init>(ObjectInputStreamEx.java:40)
at 
hudson.remoting.AbstractByteArrayCommandTransport$1.handle(AbstractByteArrayCommandTransport.java:61)
at org.jenkinsci.remoting.nio.NioChannelHub$2.run(NioChannelHub.java:594)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at 
hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
at 
jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)


Thanks in advance

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/33c4d0ec-9116-4a1d-b6f1-827081131f2e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to