Monday, February 24, 2014

Windows Azure cannot perform a VIP swap between deployments that have a different number of endpoints - Error solved

I have been taking a look at Windows Azure VIP swap feature and started facing this issue.

What this issue is all about and what is VIP Swap?

I had deployed an application on the production slot of a cloud service and the test application was deployed on the staging slot of same cloud service.
When you have both deployments of a cloud service up and running, you can perform a VIP swap which is nothing but the swap between your virtual ip addresses of production and staging deployments and doing so your production deployment becomes the staging and staging deployment becomes the production deployment.

But then after trying to perform VIP swap I started facing an error which says
Windows Azure cannot perform a VIP swap between deployments that have a different number of endpoints.
Though error was too obvious and pointing to the exact issue still as a typical developer I preferred to do a quick search on web and it seemed like its a very common issue which is faced by many people and so documenting the possible solutions.

All right, what is the solution?

Solution is quite easy as error is descriptive enough - check the number of endpoints of your cloud service deployments.

  • Check the cscfg files of both deployments i.e. production and staging. The number of input endpoints on both deployments should match.
  • Check endpoint ports of both slot's deployments e.g. Https / Http. (443/80)
  • Check if one of your deployment has remote desktop enabled on any of it's role instances because it ultimately ends up opening another port internally on your cloud service. If remote desktop is enabled then it needs to be enabled on both deployment slot's instances.

Takeaways:

Ideally your both deployments should match exactly because whenever you will want to put something on the production slot by swapping it with staging then you must have to make sure that it works correctly and this is why the staging slot is used for internal testing purpose, however there might some scenarios where you might want to have different deployments on both slots e..g Site under maintenance on production slot while you upgrade your deployment on staging and test it. So make sure to have a close look on the endpoints of your both deployments and now you know how.

2 comments:

  1. >>Site under maintenance on production slot while you upgrade your deployment on staging and test it

    I was thinking why would one require different configurations on staging and production. This clears it. Thanks :)

    ReplyDelete
  2. Yup not only this particular scenario but there might be few more like you might want to run the staging deployment with minimal instances as its just intended for testing and then scale it up when you swap in production.

    ReplyDelete