Add A Shutdown Hook for the Buildserver
Add a Shutdown Hook. In a container swarm, the swarm orchestrator may choose to shutdown a container (running a buildserver) as part of load balancing and other maintenance tasks. It will send a SIGTERM signal to the container which will send it to us. This shutdown hook causes us to wait until all build tasks are completed before we exit, ensuring that people's build jobs are not interrupted We combine this code with a configuration in the swarm service to *not* hard kill a container for a period of time (say 15 minutes) to give the buildserver a chance to finish outstanding jobs. Change-Id: Ie0fed539162e219af3df96a1402f153fc0473f0e
Showing
Please register or sign in to comment