A little more information:  here is how the AbstractCloudSlave._terminate() 
method is implemented in my custom slave:

    @Override
    protected void _terminate(TaskListener listener) throws IOException, 
InterruptedException {
        LOGGER.log(Level.INFO, "Terminating Kubernetes instance for slave 
{0}", name);

        try {
            cloud.client().deletePod(name, KubernetesCloud.POD_NAMESPACE);
            LOGGER.log(Level.INFO, "Terminated Kubernetes instance for 
slave {0}", name);
            toComputer().disconnect(null);
        } catch (Exception e) {
            LOGGER.log(Level.SEVERE, "Failure to terminate instance for 
slave " + name, e);
        }
    }


I'm wondering if the toComputer().disconnect(null) is appropriate.  

On Saturday, July 18, 2015 at 6:38:22 PM UTC-7, Mark Petrovic wrote:
>
> I am developing a cloud plugin that spins up nodes on demand to build 
> projects inside Docker containers.
>
> Everything is worked well, but I see these exceptions in the log when a 
> node finishes its job and I _terminate it:
>
> Jul 18, 2015 5:41:21 PM hudson.model.Run execute
> INFO: boot-continuous-develop #15 main build action completed: SUCCESS
> Jul 18, 2015 5:41:21 PM com.xoom.inf.jenkins.plugins.KubernetesSlave 
> _terminate
> INFO: Terminating Kubernetes instance for slave 
> 25cf5bd9-1bb8-468a-bca3-faeba0a84bde
> Jul 18, 2015 5:41:22 PM com.xoom.inf.jenkins.plugins.KubernetesSlave 
> _terminate
> INFO: Terminated Kubernetes instance for slave 
> 25cf5bd9-1bb8-468a-bca3-faeba0a84bde
> Jul 18, 2015 5:41:22 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)
>
>
> What does this mean and how can I prevent this?  
>
> Thank you.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/fb5af5c0-dc6e-46c5-80e0-9776f7085b3e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to