No agent pool found with identifier 61: why can't project collection administrator see deployment pools?

272 Views Asked by At

I am trying to set up a deployment agent on a server.

The process is failing with the message "No agent pool found with identifier 61".

Looking at the logs I can see the following

    INFO DeploymentGroupAgentConfigProvider] Found deployment group Web Servers with id 23
    INFO DeploymentGroupAgentConfigProvider] PoolId for deployment group 'Web Servers' is '61'.

This would suggest the server is connecting as it can find the deployment group id but not that of the pool.

This ties in with the fact that although I can see the relevant Deployment Group in DevOps, I cannot see the corresponding Deployment Pool.

My account is registered as a collection administrator which I would have thought would be enough to give me visibility of everything.

Also a colleague, who is also a collection administrator, CAN see the Deployment Pools which I can't.

Anyone got any idea why that might be?

When Googling for help on Deployment Groups and Pools, I found loads of information about Build Agents but not Deployment Agents and Pools.

Does anyone have a definitive resource for giving guidance on Deployment Groups and Pools, how they relate, how they differ and how they are administered?

Thanks

2

There are 2 best solutions below

0
JukkaK On

Link to the Deployment group documentation.

Deployment group is basically a specialized agent pool, only usable with classic release definitions, and provide some extra functionality, like which deployment group agent to use in which stage. You can't use them with multistage yaml-pipelines, which is good to keep in mind.

Not sure how you are installing and configuring you agent as you are not seeing the actual deployment groups, but there is a specific switches in the agent installation command for deployment groups:

.\config.cmd --deploymentpool --deploymentpoolname "WebAppDemo-deployment-group-1" --agent $env:COMPUTERNAME --runasservice --work '_work' --url 'https://dev.azure.com/myorg/

Which might explain your errors. When creating a new deployment group, it inherits some groups from the azdo project, so maybe check if you are part of those: Contributors, Deployment Group Adminstrators, Project Administrators, Release Adminstrators. Can't remember how the agent configuration authenticates if you are not using a PAT-token, but I'd guess that you basically can't authenticate in the agent config with those deployment group switches unless you rights to that group, or someone who has the rights have created a PAT-token for you.

If you do get rights to the deployment group, you can find an autogenerated installation script for agents there. I never got it to work out of the box back in the days (*, but you can at least copy the config command from there and run it manually.

*) When Azure DevOps Server was launched, haven't really used deployment groups in three years, so my info might be a bit outdated.

3
kevins1966 On

@JakkaK

Thanks for the response.

I have seen the Deployment group documentation page you referenced however I believe we have taken everything on that into account so I was looking for alternatives to get other view points.

In terms of security I have added myself to

  • Contributors
  • Deployment Group Adminstrators
  • Project Administrators
  • Release Adminstrators

The agent installation command/switch combo I used was

.\config.cmd --gituseschannel --deploymentgroup --deploymentgroupname "My Deployment Group" --agent $env:COMPUTERNAME --runasservice --work '_work' --url 'https://MyOrg.co.uk/tfs/' --collectionname 'MyCollection' --projectname 'My Project';

I tried the agent installation command/switch combo suggested and got the message

Access denied. <<User>> needs Manage permissions for pool "My Deployment Pool" to perform the action. For more information, contact the Azure DevOps Server administrator.

Given that I am in all the Security Groups listed about this makes no sense.

One thing I have noticed is that, when creating a Development Group the Development Pool name defaults to "Project Name-Development Group Name".

The Project portion of the Deployment Pool I am trying to connect to indicates to me that the Project Name has been altered since the Deployment Group was created.

ie

  • The project is called "BBB Project Name"
  • The Deployment Pool which, as I have stated above appears to be set by a default format, is called "AAA BBB Project Name-Development Group Name".

i.e. the project looks like it has been renamed from "AAA BBB Project Name" to "BBB Project Name".

You'd like to think that relationships were by identifiers rahter then names but I'm wondering if that would cause this issue.