I'm not sure this is a bug, but I want to file it anyway:
We have a declarative pipeline where we need to restart one of the nodes and continue in a later stage.
So in this node we do bat 'shutdown /s /t 30 & exit 0'
The next step uses the same node.
Before updating some plugins and or jenkins (I assume the jenkins plugins) it behaved like this: When trying to run the following stage on this node, the node is not connected yet, jenkins
Still waiting to schedule task
'<nodename>' is offline
and then after it started and connected it schedules the task and finishes the stage successfully.
after the update it immediately fails with:
<node> was marked offline: Connection was broken: java.nio.channels.ClosedChannelException
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
I solved this with adding a sleep to wait for the machine to be online again, but is there a better solution?