Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure worker role deployment fails if I don't delete the previous deployment

Tags:

azure

I've been having a generally wretched time deploying my worker roles to Azure. I'll publish my worker role once from Visual Studio and everything will work fine. I'll publish the worker role again later and the deployment fails. The instance goes into a 'recycling loop'. I spend hours trying to figure out what I broke. I tried Intellitrace but it always fails with a 'cannot download intellitrace logs' error message. Then eventually I'll delete the deployment from inside Azure Management Portal and try again and the same code that's been failing to deploy for hours will magically work.

This doesn't happen all the time, and some projects seem to 'fix' themselves and stop demonstrating this behavior all together. But what seems to be happening is that a publish from Visual Studio will fail unless I go manually delete the existing deployment.

I know this maybe a little vague but I've really got nothing to go on here. Intellitrace never works and I can't Remote Desktop into the role to poke around because it recycles so fast (which may also be why Intellitrace isn't working).

Does anyone have any idea what might be going on here?

like image 221
BowserKingKoopa Avatar asked Oct 21 '22 07:10

BowserKingKoopa


1 Answers

I did more research and I think I may know what's going on. Apparently Visual Studio tries to upgrade your worker roles in place when you deploy. If that fails, for some reason such as you changing service configuration between deployments, it just complains that there's something wrong with your role and that your instance is recycling.

In deployment options there is an option called 'If deployment can't be updated, do a full deployment' which will delete the existing deployment and deploy from scratch if the existing deployment can't be updated. I'm not sure why this isn't checked by default instead of 'fail mysteriously'.

like image 86
BowserKingKoopa Avatar answered Oct 29 '22 23:10

BowserKingKoopa