Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TFS build/release agents "update all agents" is not updating the agents for TFS on-prem 2017

For on-prem TFS 2017 when I try to update all agents in the agent pools, the update does not happen. I see the same old agent version.

Build servers typically do not have internet connectivity.

Is internet connectivity a pre-requisite for updating on prem build agents?

I had to download the new agent for a machine where I have internet and then copied the files over to a new folder in the build machine and reconfigured the agent from this new folder. After this is done I had 2 agent services - 1 pointing to older folder and 1 pointing to new folder. The service pointing to old folder was started and the new service was in stopped state. Stopped the old service and started the new service.

Is the process different for updating agent version for on-prem TFS?

like image 844
Baskar Lingam Ramachandran Avatar asked Jul 20 '17 10:07

Baskar Lingam Ramachandran


2 Answers

Even if you have Internet connection, the update may not work.

According to Daniel Steiner there are 2 kinds of agents:

  • Windows specific agents (version 1.x)
  • cross platform agents (version 2.x)

In TFS 2017 the Windows specific agents (version 1.x) are deprecated. Thus they won't be updated from the agent queues admin area. So you have to download the agent from tfs (or github) and install it yourself. After initial installation/configuration the agent updates via tfs should work again. It would have been cool if they automated that process or at least said what to do in tfs.

Unfortunately the official docu does not make the whole issue clear enough.

like image 154
mbx Avatar answered Sep 21 '22 17:09

mbx


Yes you need internet connectivity for updating on prem build agents.

Each agent automatically updates itself when it runs a task that requires a newer version of the agent. But if you want to manually update some agents, right-click the pool, and then click Update all agents.

All build agents within the selected pool will go offline temporarily and then come back online as soon as they are updated.

Which you have done is manually adding a newly version agent, not updating the agent. There are just two agents in your build server,so you had two agent services.

More details about update agent in on-premise TFS server, you could refer below tutorials:

  • Updating Your Team Foundation Build Agents
  • Upgrading TFS 2015 Build Agent
like image 36
PatrickLu-MSFT Avatar answered Sep 19 '22 17:09

PatrickLu-MSFT