Hi all, When using the Google Compute Engine plugin with `oneShot` workers, I see some stacktraces with the below error message.
*2021-06-22 16:09:45.264+0000 [id=497] INFO o.j.p.workflow.job.WorkflowRun#finish: hello-world-gce #9 completed: SUCCESS* *2021-06-22 16:09:45.936+0000 [id=497] INFO hudson.remoting.Request$2#run: Failed to send back a reply to the request hudson.remoting.Request$2@67760e47: hudson.remoting.ChannelClosedException: Channel "hudson.remoting.Channel@c9422c06:obs11-ubuntu-18-linux-14sl9x": channel is already closed* Therefore, the CloudProvisioningListener#onFailure <https://github.com/jenkinsci/jenkins/blob/36d70219e85d9c639a4b0ef8545d9bb5aa0567f4/core/src/main/java/hudson/slaves/NodeProvisioner.java#L230-L243> is executed even though the build did finish successfully. As far as I see the Google Compute Engine uses the OnceRetentionStrategy <https://github.com/jenkinsci/google-compute-engine-plugin/blob/bb7dcc6ffdd7b5f21a01817c76fbafc5a4765ea4/src/main/java/com/google/jenkins/plugins/computeengine/ComputeEngineRetentionStrategy.java#L81-L89> when the task has finished and therefore the taskCompleted <https://github.com/jenkinsci/durable-task-plugin/blob/574e7a6be7b2b5d1a38ff2e5012f255203c05466/src/main/java/org/jenkinsci/plugins/durabletask/executors/OnceRetentionStrategy.java#L88-L90> is executed for the AbstractCloudSlave. IIUC, the piece of stacktrace is caused by https://github.com/jenkinsci/jenkins/blob/862acf3e2d3fd48330a7326bd8901d82085244d6/core/src/main/java/hudson/slaves/NodeProvisioner.java#L235-L241 Question, what's the best approach to gracefully terminate the connection in the cloud providers? My aim, is to extend the CloudProvisioningListener class to monitor what cloud workers failed genuinely versus the ones that were killed gracefully? Thanks -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/66beb562-b726-4a38-a607-2eac6e3e7208n%40googlegroups.com.
