7

I've recently setup a new build configuration in Teamcity to create an Cloud Services package for Azure. After building the project with msbuild, i'm calling cspack.exe (Azure SDK 2.2) to create the package.

This is the command i'm using:

cspack.exe "ServiceDefinition.csdef" 
"/out:%Package.RelativePath%package.cspkg" 
"/role:MyWebRole;%teamcity.build.checkoutDir%\t\%build.number%;bin\MyProject.Web.dll" 
"/sites:MyWebRole;MyWebSite;%teamcity.build.checkoutDir%\t\%build.number%"

This creates a cspkg which seems correct. I've uploaded this package to the Azure storage and executed an update of the webrole. But after a while it shows an error while executing that startup tasks. After that comes an loop of restarting the webrole.

While searching for a possible cause, i've noticed that one of the directories in my approot contains a space in my original project, but in the package encoded to %20. After changing the directory name to the original name and updating the webrole again the issues disappeared.

Is anyone familiar with this issue and can point me in the right direction of solving this?

Thom Puiman
  • 370
  • 2
  • 11
  • 1
    I see the same behavior as you, using the newest Azure SDK 2.6. Creating a cspkg package with a Web or Worker Role with that has a directory with a space in it, the space is encoded to %20 in the package. This may well be a bug in cspack.exe – Svein Fidjestøl Jun 01 '15 at 05:53
  • Thanks for reproducing this! I'll try to create a bug report of this at Microsoft. – Thom Puiman Jun 01 '15 at 08:48
  • hm, also happens for Worker Roles. While this indeed is a bogus behavior, I really question the necessity of having space in folder or file names. Speaking of which, using Azure since 2008, having worked with a lot of customers and their Azure endeavors, you are the first one (who I know) to encounter that issue. And finally, the issue reported is: https://github.com/Azure/azure-sdk-for-net/issues/1251 – astaykov Jul 12 '15 at 20:12
  • Ah great. I didn't found any place to report this unfortunately. But Github is sort of the last place i'd look for... Anyhow, I know using spaces isn't great, but the application from a 3rd party folder requires the specific folder with spaces in it's name. Without any possibility to rename this, since the path is called inside code and not configurable. – Thom Puiman Jul 13 '15 at 14:32
  • Just got some feedback. The %20 only goes into the package, but not when deployed. Did you RDP to the Cloud Service Role to check whether the folder name is with the %20 or not? Because it seems, the %20 is only added to the package, but removed when unzipped. So your issue with restarting might be something else. – astaykov Jul 14 '15 at 23:43
  • @astaykov create an answer with your explanation so that he can mark it and close this question :) – Thraka Jul 15 '15 at 17:00

1 Answers1

0

The %20 only goes into the package, but not when deployed. Did you RDP to the Cloud Service Role to check whether the folder name is with the %20 or not? Because it seems, the %20 is only added to the package, but removed when unzipped. So your issue with restarting might be something else.

And by the way, the same applies for all non-URI characters, including Unicode characters that should go into the package. Which is imposed by the Open Packaging Conventions.

astaykov
  • 30,768
  • 3
  • 70
  • 86
  • Thanks for the explanation. But unfortunately my webrole was failing during the onstartup with the %20 in the package. – Thom Puiman Jul 16 '15 at 15:08
  • If you have a hard evidence for this - like logs from the role itself or screenshots from remote desktop-ing into the instance, please provide them and this will be added to the bug report. – astaykov Jul 16 '15 at 18:06