Skip to content
Commit 4eb0497e authored by intrigeri's avatar intrigeri
Browse files

Make Jenkins slave service startup more reliable and fix its status...

Make Jenkins slave service startup more reliable and fix its status information (Closes: #8508, #11858).

This fixes two related problems:

1. The initscript tried to download the JAR only once. If the Jenkins master was
not reachable at that time, the service would be considered to be correctly
running, while it would not work at all. Let's now retry to download a JAR a few
times, with a power-of-2 backoff delay, in order to wait for the Jenkins master
to show up. And whenever the download script gives up eventually, systemd
(with Restart=always) will itself restart the service a number of times.

2. The service status (reported by the unit file auto-generated from the
initscript) was always "running", because that unit file had Type=forking and
the initscript runs plenty of commands before actually starting the service,
which makes systemd guess incorrectly what process it should monitor. This made
it impossible for our monitoring system to alert us whenever this service was
not functioning. Converting to a native systemd service with Type=simple makes
systemd report correct service status information.
parent 32cd2151
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment