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?
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:
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
@Dan Martinelli
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.
Hope this helps.
@Dan Martinelli
For the first scenario:
"error": {
"code": "VipswapCloudServiceNotSucceeded",
"message": "Cloud service <Resource ID of Service A> not in Succeeded state."
}
For the second scenario:
"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."
Sign in to comment