0

The Context

I have an on-prem TFS (Azure DevOps) server (version 2018.2) with a single deployment agent installed.

This agent is in a shared deployment group and is used to deploy multiple IIS web applications, each application residing in its own project and release pipeline.

The release pipelines all use an identical flow, running the IIS Web App Deployment module to deploy each application.

In the deployment parameters each application has its own, unique virtual application specified.

The Problem

When one application is deployed, it correctly deploys to its unique virtual application, but all other virtual applications that the agent is configured to deploy even in other release pipelines get overwritten by the one application.

What I have tried

  1. Verified that each virtual application parameter is, in fact, unique in the configs
  2. Verified that the release deployment logs for any given deployment do not mention any extra deployment paths. This is particularly perplexing, because the logs say that the operation correctly deploys to only one virtual application.
  3. Check for any strange IIS logs on the target server

The Question

What are the best next steps for debugging an Azure DevOps issue like this? This is an on-prem server, so I have a higher level of access than if this were cloud hosted.

I am thinking perhaps:

  1. Check the agent version and update it to latest?
  2. Could there be other logs with valuable info? On the target server? On the DevOps server?
David
  • 13,133
  • 1
  • 30
  • 39
  • Did you run the deployment with the `system.debug` variable set to `true`? – Daniel Mann Apr 14 '20 at 18:07
  • @DanielMann, I did, with the same results. The logs make no mention of extra deployment paths, only one virtual application is ever listed. – David Apr 14 '20 at 18:40
  • @David Could you share your build definition? – Cece Dong - MSFT Apr 15 '20 at 09:37
  • Thanks @CeceDong-MSFT. I solved the problem with help from an [Azure DevOps troubleshooting document](https://learn.microsoft.com/en-us/azure/devops/pipelines/troubleshooting?view=azure-devops). I will post my process as an answer. – David Apr 15 '20 at 14:16

1 Answers1

1

I solved the problem. See the written-up process below.

Solution

The problem was not with the deployment module, but rather I had mis-configured the IIS management module that ran immediately preceding each deployment module. Each management module had the same physical path parameter value set for each virtual application, which caused each deploy to overwrite any previous deploy.

Debugging Process

When writing up a corresponding issue for this on github, ironically, there was a link to instructions for troubleshooting AzureDevops, so I started following that document.

  1. I turned on verbose logging on the deployment agent by adding the system.debug variable to the release pipeline and setting it to true.
    • From this I could see that there were, in fact, no other virtual applications being deployed to
  2. I checked the additional agent logs on the target server under the agent install directory in a directory titled _diag.
    • This showed that everything was working correctly
  3. Still not convinced, I looked at the source code and found that all the module is doing is running MsDeploy.
    • This got me wondering if all the deployments were going to the same physical location
  4. Then I looked at my config for the IIS management module and noticed that I had set identical physical paths for each virtual application.
  5. I tested the hypothesis by setting a different physical path for each application, and, yay, the applications no longer overwrote each other!
David
  • 13,133
  • 1
  • 30
  • 39