You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I defined an Azure Resource Manager Cloud Profile and configured an Agent Image using the DockerHub image spec'd as (with the other settings not relevant to this issue):
Deployment: New resource group
Image Type: Container
Docker Image: jetbrains/teamcity-agent
Name Prefix: tc-agent
Within Azure, these resources were created (see attached image, 1-Initial-Resource-Group):
A Resource Group, named tc-agent
A Container Instance, named tc-agent1 within that Resource Group
When left to idle-out, or if I manually stop it within the Agent Pool, it fails to stop with the following error. Failed to delete resource group tc-agent1: Resource group 'tc-agent1' could not be found. (see attached image, 2-Stop-Fail)
I had to create a Resource Group with the name tc-agent1, which allowed TeamCity to complete its stop. That action deleted the newly/manually created tc-agent1 Resource Group, but left the original tc-agent Resource Group intact, with the Container Instance still running within.
Then, TeamCity either started up the Agent again, or recognized it was still running, which put me in a bad loop until I deleted the Agent Image definition and cleaned up Azure resources.
It appears that the upon initial deploy, the Resource Group created used the prefix as its name and allocates an agent with a numerical increment appended to the prefix for a name. Then, upon termination, an easy clean up using Resource Group deletion is made expecting that the Resource Group name is the same as the Agent instance name, which it is not.
If I had my choice, I would prefer to have a single Resource Group in which all resources for the Agent Image definition are placed, then have the stop not perform a Resource Group deletion, but only a deletion of the Container Instance (and the networkProfile) which got created. This is much preferred over using separate Resource Groups for each Container Instance which is spun up.
Description
I defined an Azure Resource Manager Cloud Profile and configured an Agent Image using the DockerHub image spec'd as (with the other settings not relevant to this issue):
Within Azure, these resources were created (see attached image, 1-Initial-Resource-Group):
tc-agent
tc-agent1
within that Resource GroupWhen left to idle-out, or if I manually stop it within the Agent Pool, it fails to stop with the following error.
Failed to delete resource group tc-agent1: Resource group 'tc-agent1' could not be found.
(see attached image, 2-Stop-Fail)I had to create a Resource Group with the name
tc-agent1
, which allowed TeamCity to complete its stop. That action deleted the newly/manually createdtc-agent1
Resource Group, but left the originaltc-agent
Resource Group intact, with the Container Instance still running within.Then, TeamCity either started up the Agent again, or recognized it was still running, which put me in a bad loop until I deleted the Agent Image definition and cleaned up Azure resources.
It appears that the upon initial deploy, the Resource Group created used the prefix as its name and allocates an agent with a numerical increment appended to the prefix for a name. Then, upon termination, an easy clean up using Resource Group deletion is made expecting that the Resource Group name is the same as the Agent instance name, which it is not.
If I had my choice, I would prefer to have a single Resource Group in which all resources for the Agent Image definition are placed, then have the stop not perform a Resource Group deletion, but only a deletion of the Container Instance (and the networkProfile) which got created. This is much preferred over using separate Resource Groups for each Container Instance which is spun up.
Environment
Diagnostic logs
None provide for this issue.
The text was updated successfully, but these errors were encountered: