Problems calling azure powershell commands to push build output to (our) blob store

James Murphy's Avatar

James Murphy

06 Aug, 2014 10:03 AM

When we build we push our packaged content to azure blob store (ours)

Unfortunately yesterday afternoon we started getting:

Set-AzureStorageBlobContent : Method not found: 'Microsoft.WindowsAzure.CloudException Microsoft.WindowsAzure.CloudException.Create(System.Net.Http.HttpRequestMessage, System.String, System.Net.Http.HttpResponseMessage, System.String, System.Exception)'.
At C:\projects\clickscotravelsystem\src\Deploy\Deploy-Copy-to-Blob.ps1:131 char:13
Set-AzureStorageBlobContent -Container $containerName -File $configT ...
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Set-AzureStorageBlobContent], MissingMethodException
    + FullyQualifiedErrorId : MissingMethodException,Microsoft.WindowsAzure.Commands.Storage.Blob.SetAzureBlobContentCommand

I'm guessing right around the time that the SDK got updated. There's also a new version of the Azure Powershell Commands that I'm guessing needs to be installed to go with the new SDK

  1. Support Staff 1 Posted by Feodor Fitsner on 06 Aug, 2014 10:48 PM

    Feodor Fitsner's Avatar

    Hi James,

    You're right , we installed SDK 2.4 and updated Azure PowerShell. Let me check if it was correctly updated.

  2. Support Staff 2 Posted by Feodor Fitsner on 06 Aug, 2014 11:19 PM

    Feodor Fitsner's Avatar

    Everything seems to be correct. The latest 0.8.6 version is installed (https://github.com/Azure/azure-sdk-tools/releases) along with SDK 2.4.

    I tested the cmdlet and it works: https://ci.appveyor.com/project/appvyr/appveyor-bot-0904-0540/build...

  3. 3 Posted by James Murphy on 07 Aug, 2014 07:27 AM

    James Murphy's Avatar

    And there was I hoping this was going to be an easy fix )-:

    So something more subtle is going on in the interaction between my scripted build and the image because I just re-ran the build and I got the same error. Will see if I can reproduce on a smaller scale.

  4. Support Staff 4 Posted by Feodor Fitsner on 07 Aug, 2014 12:08 PM

    Feodor Fitsner's Avatar

    Let me know if you need any help with your build script. Btw, what cmdlet signature do you use to upload a blob?

  5. 5 Posted by James Murphy on 07 Aug, 2014 02:38 PM

    James Murphy's Avatar

    Ok,

    From my test, the cmdlets are available if you call them directly from the .yml but I'm calling them from a script (i.e. I have the following in the .yml):

    -ps: .\Deploy\Deploy-copy-to-blob.ps1
    

    And when I make the calls to azure cmdlets within that script that's when I get the error.

    Was working consistently prior to the SDK upgrade, fails now.

  6. Support Staff 6 Posted by Feodor Fitsner on 07 Aug, 2014 02:56 PM

    Feodor Fitsner's Avatar

    I've made a test project to reproduce that: https://github.com/FeodorFitsner/azure-blob-deploy-test

    Here the build results: https://ci.appveyor.com/project/appvyr/azure-blob-deploy-test

    I still think the problem is in the way you call that cmdlet. What's signature/parameters did you use?

  7. 7 Posted by James Murphy on 07 Aug, 2014 03:06 PM

    James Murphy's Avatar

    I'll try it again locally and see what I get, detail may be a bit sensitive - but I do adhere to "never assume its not my fault" so I may be doing something wrong.

    However it was working and that suddenly stopped co-incident with the upgrade of the SDK.

    Also - so far as I'm aware, again I need to check in more depth - we didn't change anything (and the failure was concurrent across different branches).

    Last, but not least, its not one cmdlet that fails its several - Get-AzureStorageContainer, New-AzureStorageContainer and Set-AzureStorageBlobContent but all with similar errors

  8. Support Staff 8 Posted by Feodor Fitsner on 07 Aug, 2014 03:58 PM

    Feodor Fitsner's Avatar

    OK, let's deploy a previous version of Azure PowerShell tools to see if it's causing a problem.

  9. 9 Posted by James Murphy on 07 Aug, 2014 04:33 PM

    James Murphy's Avatar

    I've got a very simple test script now (assuming I've corrected all the typos) if that works its probably somewhere between the two of us. If it fails its all me!

  10. Support Staff 10 Posted by Feodor Fitsner on 07 Aug, 2014 04:50 PM

    Feodor Fitsner's Avatar

    I installed back the previous 0.8.5 version of Azure PowerShell tools. Let me know if it fixes your build.

  11. 11 Posted by James Murphy on 26 Aug, 2014 08:02 AM

    James Murphy's Avatar

    Apologies, been off on my holidays and not able to play.

    Looking at my test, there's definitely something wrong in what I'm doing - now able to pick up my investigations again.

  12. Support Staff 12 Posted by Feodor Fitsner on 26 Aug, 2014 03:04 PM

    Feodor Fitsner's Avatar

    OK, keep me posted.

  13. 13 Posted by James Murphy on 27 Aug, 2014 03:21 PM

    James Murphy's Avatar

    Ok, I changed the powershell to use a storage context (it wasn't before) and it now appears to be behaving itself properly.

  14. Support Staff 14 Posted by Feodor Fitsner on 27 Aug, 2014 03:23 PM

    Feodor Fitsner's Avatar

    Great, thanks for the update! I'm wondering if it will be working with the latest 0.8.6 Azure PowerShell. Could you please check?

    -Feodor

  15. 15 Posted by James Murphy on 28 Aug, 2014 07:46 AM

    James Murphy's Avatar

    Certainly should do (does locally, but that's where we came in...)

  16. Support Staff 16 Posted by Feodor Fitsner on 28 Aug, 2014 02:39 PM

    Feodor Fitsner's Avatar

    I can load 0.8.6 on a test image and you give it a try?

    -Feodor

  17. 17 Posted by James Murphy on 28 Aug, 2014 02:41 PM

    James Murphy's Avatar

    Absolutely – in fact I’d bet that wasn’t the problem at all, though I’m at a complete loss to see what was (given that it went from working to not…)

    James

  18. Support Staff 18 Posted by Feodor Fitsner on 28 Aug, 2014 11:18 PM

    Feodor Fitsner's Avatar

    Hi James,

    I've installed the latest Azure PowerShell 0.8.7.1 onto test build worker image. To use that image open project settings - Environment tab, then click Operating system link and select test-clicksco or in appveyor.yml add:

    os: test-clicksco
    

    Let me know about the results.

  19. 19 Posted by James Murphy on 29 Aug, 2014 08:16 AM

    James Murphy's Avatar

    Done, worked perfectly.

  20. Support Staff 20 Posted by Feodor Fitsner on 29 Aug, 2014 08:26 PM

    Feodor Fitsner's Avatar

    OK, thanks for the update! Will push this with the next image update.

  21. Support Staff 21 Posted by Feodor Fitsner on 31 Aug, 2014 05:45 PM

    Feodor Fitsner's Avatar

    The image is in production now and you can switch back to the default. Let me know when it's done and I'll remove test one from your account.

  22. 22 Posted by James Murphy on 01 Sep, 2014 06:54 AM

    James Murphy's Avatar

    We're using the default., so feel free to nuke the test image.

  23. Support Staff 23 Posted by Feodor Fitsner on 01 Sep, 2014 08:01 PM

    Feodor Fitsner's Avatar

    Done, thanks!

  24. James Murphy closed this discussion on 10 Sep, 2014 06:57 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac