a·gen·tic a·gil·i·ty

Ghost build controllers in Team Foundation Server

Learn how to identify and remove undeletable ghost build controllers in Team Foundation Server by updating build status in the database, avoiding unsupported deletions.

Published on
3 minute read
Image
https://nkdagility.com/resources/ks3BqiRqWAK
Subscribe

Have you ever seen ghost build controllers in Team Foundation Server that you just can’t seam to delete no matter what you do? Sometime there are builds left over in the system that were queued but never completed.

Most of the time they are easy to delete, but sometimes it takes a little effort. Even rarer are those times when something just will not go away no matter how much you try. Indeed we have had a ghost (phantom) team build controller hanging around for a while now, and it had defeated my best efforts to get rid of it.

The build controller was from our old TFS server from before our TFS 2010 beta 2 upgrade and was really starting to annoy me. Every time I try to delete it I get the message:

Controller cannot be deleted because there are build in progress
-Manage Build Controller dialog

Ghost build controllers in Team Foundation Server  

Figure: Deleting a ghost controller does not always work.

I ended up checking all of our 172 Team Projects for the build that was queued, but did not find anything. Jim Lamb pointed me to the “tbl_BuildQueue” table in the team Project Collection database and sure enough there was the nasty little beggar.

Ghost build controllers in Team Foundation Server

Figure: The ghost build was easily spotted

Adam Cogan asked me:

“Why did you suspect this one?”

Well, there are a number of things that led me to suspect it:

This build must have been queued long ago when we were using TFS 2008, probably a beta, and it never got cleaned up. As controllers are new in TFS 2010 it would have created the “zzUnicorn” controller to handle any build servers that already exist. I had previously deleted the Agent, but leaving the controller just looks untidy.

Now that the ghost build has been identified there are two options:

So I set the Status of this build to 2 (cancelled) and sure enough it disappeared after a couple of minutes and I was then able to then delete the “zzUnicorn” controller.

Ghost build controllers in Team Foundation Server

Figure: Almost completely clean

Now all I have to do is get rid of that untidy “zzBunyip” agent, but that will require rewriting one of our build scripts which will have to wait for now.

Troubleshooting
Subscribe

Related Blog

No related videos found.

Connect with Martin Hinshelwood

If you've made it this far, it's worth connecting with our principal consultant and coach, Martin Hinshelwood, for a 30-minute 'ask me anything' call.

Our Happy Clients​

We partner with businesses across diverse industries, including finance, insurance, healthcare, pharmaceuticals, technology, engineering, transportation, hospitality, entertainment, legal, government, and military sectors.​

MacDonald Humfrey (Automation) Ltd. Logo

MacDonald Humfrey (Automation) Ltd.

DFDS Logo

DFDS

Brandes Investment Partners L.P. Logo

Brandes Investment Partners L.P.

Qualco Logo

Qualco

Microsoft Logo

Microsoft

Schlumberger Logo

Schlumberger

Ericson Logo

Ericson

Flowmaster (a Mentor Graphics Company) Logo

Flowmaster (a Mentor Graphics Company)

NIT A/S

Lockheed Martin Logo

Lockheed Martin

Teleplan Logo

Teleplan

New Signature Logo

New Signature

ALS Life Sciences Logo

ALS Life Sciences

Bistech Logo

Bistech

Milliman Logo

Milliman

Trayport Logo

Trayport

Workday Logo

Workday

Lean SA Logo

Lean SA

Royal Air Force Logo

Royal Air Force

Washington Department of Transport Logo

Washington Department of Transport

Washington Department of Enterprise Services Logo

Washington Department of Enterprise Services

Department of Work and Pensions (UK) Logo

Department of Work and Pensions (UK)

Nottingham County Council Logo

Nottingham County Council

Ghana Police Service Logo

Ghana Police Service

Microsoft Logo

Microsoft

Hubtel Ghana Logo

Hubtel Ghana

YearUp.org Logo

YearUp.org

Cognizant Microsoft Business Group (MBG) Logo

Cognizant Microsoft Business Group (MBG)

NIT A/S

Slicedbread Logo

Slicedbread