Bamboo plan build agent agent choice based on agent disk free

Ferenc Deak March 7, 2013

Hi,

I have a build farm here, where several hosts are configured to build the same plan (building it takes pretty long and there might be new commits while building, and from time to time we also start the builds manually, so it is good to have a host ready immediately ... we have long and complicated process, anyway, this is not important).

The problem is that not all the hosts are identical. A few of them have a smaller hard disk and they tend to fill up from time to time, to an extent when a full build willl not complete (the full build generates around 7GB (seven gigabytes) of data) and it would be great to tell bamboo to choose only an agent which has at least 7GB free space.

Is this possible?

Thanks, Ferenc

2 answers

0 votes
Brent Villalobos
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 10, 2013

We run a daemon process on each agent that continuously checks the disk space (I think it runs "df" every minute). When the used disk space reaches a certain threshhold, it disables the agent, looks for older Bamboo workspaces (and specifically avoids the currently running build), deletes them, and then re-enables the agent. The disable/enable is so that the machine doesn't pick up any new jobs and potentially uses a workspace that was already marked for deletion.

We have not seen any failures due to full disks since we implemented this strategy.

0 votes
Adam Myatt
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 8, 2013

There is no built-in functionality, nor existing plugins, for this at this time that I am aware of. I would suggest for each Job going to the Misc tab and selecting "Clean working directory after each build". THis can clean up disk space but add to build times that may already be too long.

Adam Myatt
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 8, 2013

You may also consider using the Script task to run a shell script or bat file that identifies the free disk and possibly fails the build. This wouldn't help you select an agent, but could be step 1 in your build and it would fast-fail the build right away rather than possibly running for hours before failing due to out of disk issue anyway.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events