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

2

7

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?

Stuckup answered 20/7, 2017 at 10:2 Comment(0)
M
3

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:

Mutineer answered 20/7, 2017 at 15:16 Comment(5)
So there is not a way to auto update on-prem build agents to a version higher than that came with TFS? !Stuckup
@BaskarLingamRamachandran Without internet connectivity, yes. Test in myside got the same result as you. With internet connectivity you could update the agent version and sometimes the agent version will auto update if your build task need.Mutineer
Could there be a way to update the agent version in TFS so that the agents can then pick the latest from TFS? Does whole TFS need to be upgraded for this agent to be up to date?Stuckup
@BaskarLingamRamachandran Does whole TFS need to be upgraded for this agent to be up to date? No. You could directly update a build agent version, the normal solution is Right-click on the agent pool that you want to update. Choose Update All Agents from the context menu. You could go through this discuss, github.com/Microsoft/tfs-cli/issues/43. I'm afraid you need either connect to internet to do the force update or copy the newly agents from other machine and install a new one. Or download the agent from github (github.com/Microsoft/vsts-agent/releases) directlyMutineer
Yes.. I did download the latest and that's fine.. So for a intranet build agent "Update all agent" won't work.. Marking your answer..Stuckup
B
6

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.

Barite answered 31/8, 2017 at 7:12 Comment(1)
Thank you for adding this. I was all about this question until I got to the part "do I need internet?" and then I facepalmed... until I saw your answer.Aspersion
M
3

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:

Mutineer answered 20/7, 2017 at 15:16 Comment(5)
So there is not a way to auto update on-prem build agents to a version higher than that came with TFS? !Stuckup
@BaskarLingamRamachandran Without internet connectivity, yes. Test in myside got the same result as you. With internet connectivity you could update the agent version and sometimes the agent version will auto update if your build task need.Mutineer
Could there be a way to update the agent version in TFS so that the agents can then pick the latest from TFS? Does whole TFS need to be upgraded for this agent to be up to date?Stuckup
@BaskarLingamRamachandran Does whole TFS need to be upgraded for this agent to be up to date? No. You could directly update a build agent version, the normal solution is Right-click on the agent pool that you want to update. Choose Update All Agents from the context menu. You could go through this discuss, github.com/Microsoft/tfs-cli/issues/43. I'm afraid you need either connect to internet to do the force update or copy the newly agents from other machine and install a new one. Or download the agent from github (github.com/Microsoft/vsts-agent/releases) directlyMutineer
Yes.. I did download the latest and that's fine.. So for a intranet build agent "Update all agent" won't work.. Marking your answer..Stuckup

© 2022 - 2024 — McMap. All rights reserved.