question

DanMartinelli-1828 avatar image
0 Votes"
DanMartinelli-1828 asked vipullag-MSFT commented

Cloud Service - SwappableCloudService failing to deploy

I have a generalised ARM template that I'm using to deploy 2 Cloud Service (extended support) instances.
Instance A deploys successfully from the template however when I come to deploy Instance B with the additional property of

  "swappableCloudService": {
         "id": "<Resource ID of Service A>"
       }

the deployment fails and returns the message

"status": "Failed",
"error": {
"code": "VipswapCloudServiceNotSucceeded",
"message": "Cloud service <Resource ID of Service A> not in Succeeded state."
}

When querying the API and checking the portal I can see the the provisioning state for service A is "Succeeded"

As I understand the it, the additional property and ID to "partner" the two services and make them swappable must be defined at the time the second service is deployed and cant be added afterwards.

Am I missing something obvious here?

azure-cloud-services-extended-support
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@DanMartinelli-1828

Can you please confirm on this to assist you better.

Is the deployment for Service-A completed and Service-A was in succeeded state before you started deployment for Service-B?

0 Votes 0 ·

Yes that is confirmed.

In my testing this morning I found that if I deploy Service B without the additional property and then run the template again for Service B WITH the additional property, the deployment succeeds.
It appears that the error message returned is incorrect as it's actually Service B that's not ready.

So the actual steps are:

  1. Deploy Service A

  2. Deploy Service B

  3. Redeploy Service B with the swappableCloudService property, targeting Service A

After this is complete I am unable to Swap the services, the button does not light up in the portal but if i try to run the deployment for a 4th time I get the error message

"code": "VipswapSwappableCloudServiceChangeNotAllowed",
"message": "SwappableCloudService property cannot be modified to <ResourceID of Service A>. Once set, this property cannot be changed unless the existing swappable cloud service is first deleted."

Confirming that the two services now linked

0 Votes 0 ·

@DanMartinelli-1828

For the first scenario:
1. Deploy Service A
2. Deploy Service B which failed with error:

 "status": "Failed",
 "error": {
 "code": "VipswapCloudServiceNotSucceeded",
 "message": "Cloud service <Resource ID of Service A> not in Succeeded state."
 }

For the second scenario:
1. Deploy Service A
2. Deploy Service B
3. Redeploy Service B with the swappableCloudService property, targeting Service A – Is this step was succeeded? By design it should not and fail with below error:

 "code": "VipswapSwappableCloudServiceChangeNotAllowed",
 "message": "SwappableCloudService property cannot be modified to <ResourceID of Service A>. Once set, this property cannot be changed unless the existing swappable cloud service is first deleted."


0 Votes 0 ·

@DanMartinelli-1828
As I understand the it, the additional property and ID to "partner" the two services and make them swappable must be defined at the time the second service is deployed and cant be added afterwards. - this understanding is completely correct.

This is documented here.

110853-swapable-cs.jpg

Hope this helps.

0 Votes 0 ·
swapable-cs.jpg (29.6 KiB)

0 Answers