Cloud plugin, disconnecting from slave properly

15 views
Skip to first unread message

Stanislav Baiduzhyi

unread,
Sep 6, 2015, 3:20:37 PM9/6/15
to jenkin...@googlegroups.com
Hi All,

Another question regarding custom cloud plugins:

I'm creating a custom plugin that creates a node from prototype, uses
the node, discards it (or reverts the state).

I'm starting slave.jar with tcp and connecting to it. My
ComputerLauncher also implements ExecutorListener, and disconnects on
taskCompleted, and terminates/discards the node in afterDisconnect.
But I see huge stack traces about socket being closed.

I've copied the closing procedure from here:
https://github.com/jenkinsci/vsphere-cloud-plugin/blob/master/src/main/java/org/jenkinsci/plugins/vSphereCloudSlave.java#L305

So, what is the correct way to disconnect the channel before node termination?

Oleg Nenashev

unread,
Sep 27, 2015, 5:03:22 PM9/27/15
to Jenkins Developers
Where do you see these traces?
"slave.waitUntilOffline();" ensures that channel is null before existing, but I suppose that there could be exceptions from background monitoring threads and hanging jobs (good ones should be gracefully aborted).

воскресенье, 6 сентября 2015 г., 22:20:37 UTC+3 пользователь Stanislav Baiduzhyi написал:

Kanstantsin Shautsou

unread,
Sep 27, 2015, 5:27:36 PM9/27/15
to Jenkins Developers
Please, provide logs. 
Stacktrace is expected behaviour because some things in Jenkins works asynchronously and jenkins prints stacktraces even for expected behaviours.
Reply all
Reply to author
Forward
0 new messages