Erik Oppedijk
Erik Oppedijk

Reputation: 3553

Error swap slot settings Release Management Visual Studio Team Services

In Release Management on Visual Studio Team Services I receive the following error:

"Code": "Conflict", 
"Message": "The slot cannot be changed because its configuration settings have been prepared for swap.", 
"ExtendedCode": "04081",
"MessageTemplate": "The slot cannot be changed because its configuration settings have been prepared for swap.",

From my Release management template in the "Azure Deployment" step, I have the following configuration: Azure connection type: Azure Resource Manager Action: Create or update Resourcegroup Deployment mode: incremental

We have an ARM template with only appsettings we want to have applied to the production slot. the previous step in this release is a "Swap"

More info: we first release to some test slots, then a QA slot, which swaps with PROD. This first occurred with a scheduled release (at midnight)

The slots are like this:

QA:

  • some steps (like blob copy),
  • final step: deploy a complete ARM template which creates the resources

PROD:

  • step 1: SWAP, with Azure App Service Manager (Preview)
  • step 2: ARM template with only AppSettings

Even a new build (which triggers a new release) still causes this error, any hints/clues?

Upvotes: 2

Views: 4609

Answers (2)

Chavi Gupta
Chavi Gupta

Reputation: 255

I was able to figure out the root cause of this issue. If the Azure App Service Manager (Swap step) fails for some reason, in that case, Swap action does not get completed and leaves the App Service in inconsistent state.

If you go to the Azure portal and see the Overview of your App Service, 'Complete Swap' option is enabled instead of 'Swap'. Hence we should first Cancel or Complete the incomplete Swap. After doing that the deployment just works fine without this error.

enter image description here

Upvotes: 7

Erik Oppedijk
Erik Oppedijk

Reputation: 3553

We seemed to have this resolved

  • with only running step 2 in PROD (not perform a swap)
  • using another admins credentials
  • after trying several days

Not sure yet which one was the culprit.

The Azure App Service Manager (Preview) was used as a swap step

Upvotes: 0

Related Questions