microsoft / azure-pipelines-agent

Azure Pipelines Agent 🚀
MIT License
1.7k stars 856 forks source link

[Question]: scaled down agents are not shown in offline mode after upgrading to 3.241.0 #4879

Closed sambitr closed 1 day ago

sambitr commented 3 days ago

Describe your question

Hi There, After upgrading our docker-in-docker based self-hosted agents to 3.241.0, we are not seeing our scaled down agents in offline mode in the agent pool. I can see older versioned agents in offline mode though.

This is happening only when the cronjob automatically scaled down the agent pods in kubernetes. When we manually delete the agent pod, it appears in offline mode.

Every evening at 7 PM UTC, our agents scaled down from 30 to 12 pods and in the next morning at 7AM, they scale back to 30 pods. Those 18 agent pods who were scaled down, should be visible as offline in the agent pool section. But they are not.

Our older agent pods, who were in version 2.194.0 are shown as offline.

Any new feature added to the version that does this?

Versions

version 3.241.0

ubuntu:22.04

Environment type (Please select at least one enviroment where you face this issue)

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Operation system

ubuntu:22.04

Version controll system

No response

Azure DevOps Server Version (if applicable)

No response

sambitr commented 3 days ago

Can someone answer this? My agent deployment just got scaled down and I don't see any offline agents any more. I need to understand how the agent is marked as offline. Because manually deleting the agent pod makes them offline in the agent pool. So why the scale down operation does not mark them as offline?

ivanduplenskikh commented 2 days ago

@sambitr, this issue appears to be related to AzureDevOps, as the agent hasn't changed to inform ADO that it's alive. This repo is primarily for the agent - I would suggest opening a ticket on the Azure DevOps Community portal to get the right eyes on it.

sambitr commented 1 day ago

Thanks @ivanduplenskikh , I got response on the Azure DevOps community portal.