1

I have a simple yaml pipeline file as follows:

stages:
  - stage: build_xm2simu
    displayName: This is the build stage of the XM Simu project
#    dependsOn: string | [ string ]
#    condition: string
    jobs: 
    - job: linux_dotnet_build
      pool: 
        name: my-desktop
#        demands: 
#        - netcore -equals 3.1
      steps: 
      - powershell: dotnet restore source\backend\XM2Simu\XM2Simu.csproj

and I also have configured three different agents:

  • my-desktop / windows host agent → capabilities: {plenty but netcore}
  • my-desktop / linux docker agent with dotnet → capabilities: netcore 3.1, PowerShell 6.x, {some more}
  • my-desktop / linux docker agent with azure cli

In case I remove the explicit demand with netcore then it runs on my windows host agent and fails as expected since there is no source\backend\XM2Simu\XM2Simu.csproj file currently there.

In case the netcore demand is added, it doesn't finds any agent suitable, and I only get the following message:

Waiting for an available agent. All eligible agents are disabled or offline

I also get the above message in case the netcore demand is removed but the windows host agent is offline.

Question: How to find out Azure DevOps Services pipeline demand / capability requirements to select some specific agent? (implicit and explicit demands)

Note: I'm currently investigating this issue and maybe related to this post.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
minus one
  • 642
  • 1
  • 7
  • 28
  • According to your troubleshootingm, it seems the agent `linux docker agent with dotnet` is not a eligible agents. Have you check if that agent keep Online? And try to update the agent or create a new agent to test this issue. – Leo Liu Jun 09 '20 at 06:32
  • 1
    May be you are perfectly right. But how to know what is missing without hacking all day? – minus one Jun 09 '20 at 06:58
  • I am afraid we could not to know this, because we could not debug the private agent at this moment. – Leo Liu Jun 09 '20 at 09:20

1 Answers1

1

How to find out Azure DevOps Services pipeline demand / capability requirements to select some specific agent? (implicit and explicit demands)

What you did should be correct.

According to your troubleshooting steps and the error messages you get:

Waiting for an available agent. All eligible agents are disabled or offline

Besides, I also test your yaml file with my private agent, it works fine.

It seems the error comes from the agent linux docker agent with dotne itself, it should not a eligible agents.

So, first, we could check if that agent keep Online. If yes, we could try to update the agent.

Second, if above not help, please download the latest agent from VSTS web page, and config again.

Hope this helps.

Leo Liu
  • 71,098
  • 10
  • 114
  • 135
  • In our case, the agent was not up to date and the automatic update was unable to fix this problem. I'm not sure, but I would expect an error message telling me that "the agent version requirement has not been met" instead of triggering an automatic update for the agent which may not be successful. – minus one Sep 11 '20 at 12:34
  • The agent update is also not as easy as it could be: the example on the DevOps side only works if the agent has internet access. Which is strange for an on-prem service. The VSTS server only provides a list where the agent may get the latest client package but does not host an instance of it. – minus one Sep 11 '20 at 12:44