I have a situation where Jenkins starts a job on a remote test machine, and as part of the test, the system must boot into an operating system that cannot have networking, well, working.
The test machine runs some stuff (15 minutes to hours or days (or even weeks), then boots back to Linux.
However, Jenkins has a tendency to not restart the Java client after the test host boots Linux. (And you can't start the agent yourself, you must let Jenkins do that, since it talks to that agent via stdin/out.)
Settings for the host:
# executors: 1
Launch via ssh
Max # retries 0
Seconds to wait between retries 30
I'm using pipeline. First it uses master node to do setup, the switches to test host node to do some more setup. Finally it switches back to master, registers a web hook, then switches back to test host to do the stage-specific stuff and then reboot.
Then switch back to master, wait for web hook.
So, that's the pipeline script in english-ish.
Once the test finishes and the test host is in Linux, Jenkins doesn't seem to notice. So I go to the node status page in Jenkins and hit "relaunch agent" - it starts just fine and everything continues like designed. But that's a manual step which isn't acceptable.
So, either I need to get Jenkins to relaunch the agent itself, or I need a URL on Jenkins server that I can curl to to get it relaunched.