Mechanism for draining Agents/Resources for reboot

Answered

If I need to reboot all agents and possibly the server at the same time, think planned outage of our hardware, how does TeamCity handle draining those resources?  What I mean is, how does TeamCity handle stopping builds/runs from getting assigned to agents, but let what's currently running finish?  Is there a mechanism for doing that or do you just end up killing jobs?  I'd like to shut TeamCity down cleanly before reboots.

2 comments

Hello James,

It's recommended to stop TeamCity server before rebooting the machine. TeamCity agent will reconnect to the server when it's up and running. The build queue is saved to the database and will be restored. The running builds will be canceled and added back to the queue when server starts.

If you want to reboot agent machine, it's recommended to stop TeamCity agent. Whether the build will finish or will be canceled depends on the used command.

1

Thanks Alina, makes more sense now.

0

Please sign in to leave a comment.