What happens to tasks on disconnected slaves?

15 views
Skip to first unread message

Maciej Jaros

unread,
Feb 2, 2018, 8:08:32 AM2/2/18
to Jenkins Users
Hi.

I'm wondering if using Jenkins slaves is the right solution for long running tasks on remote servers.

I want to run a long running task (like e.g. restoring databases), but I'm worried about temporary connection issues. Note that my Jenkins server is non-public and it has a one way connection to the deployment server. So I'm planning to use SSH to connect from Jenkins to slave (using SSH Slaves plugin).

So... What happens if a Jenkins slave is disconnected from master while running my restore task?
Will the task keep on running (i.e. run commands that restore databases and run other build steps)?
Will I be able to see log of the tasks from master (i.e. will Jenkins automatically re-connect to slave and download logs from slave)?
If not will I be able to at least retrieve a log form the slave (e.g. by downloading files manually)?

Regards,
Nux.

Daniel Beck

unread,
Feb 2, 2018, 8:35:53 AM2/2/18
to Jenkins Users

> On 2. Feb 2018, at 14:07, 'Maciej Jaros' via Jenkins Users <jenkins...@googlegroups.com> wrote:
>
> So... What happens if a Jenkins slave is disconnected from master while running my restore task?

Depends.

Pipelines just continue, they've been designed with resilience like this in mind. Once the connection is reestablished, the logs are downloaded and build completed.

Freestyle/Maven/Matrix may or may not complete your job. IIRC, the current program may complete, but the controlling script with abnormally exit. The build information in Jenkins will not reflect this properly.


Reply all
Reply to author
Forward
0 new messages