1
votes

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?

2
What're details of release and build definition? Provide the detail build and release steps/tasks of your build and release definitions. >>Even a new build (which triggers a new release) still causes this error, any hints/clues? The release will be triggered when new artifact version is available, so don't publish Build Artifacts if previous step is failed (Copy and Publish Build Artifacts step).starian chen-MSFT
We finally fixed it, but are unsure of the fix: another admin tried it and we disabled the swap. Not sure if this fixed it, or just as time passed?Erik Oppedijk
I noticed that the swap was still a preview serviceErik Oppedijk

2 Answers

5
votes

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

0
votes

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