in Technology by (1.9m points)
What happens when a Jenkins agent is offline and what is the best practice in that situation?

1 Answer

0 votes
by (1.9m points)

When a job is tied to a specific agent on a specific node, the job can only be run on that agent and no other agents can fulfill the job request. If the target node is offline or all the agents on that particular node are busy building other jobs, then the triggered job has to wait until the node comes online or an agent from that node becomes available to execute the triggered build request.

As a result, a triggered job may sometimes wait indefinitely without knowing that the target node is offline. So, it is always the best practice to tie the jobs to a group of nodes & agents, referred to with a 'Label'. Once a job is tied to a Label, instead of a specific node/agent, any of the nodes/agents falling under the label can fulfill a build request, when a job is triggered. This way we can reduce the overall turn-around time of the builds.

Even then if a job is waiting for more time for the nodes/agents, then it is time to consider adding more nodes/agents.

Related questions

0 votes
asked Mar 20 in Education by JackTerrance (1.9m points)
0 votes
asked Mar 19 in Education by JackTerrance (1.9m points)