liprec / vsts-release-aas

Repository for my Analysis Service Azure pipelines tasks related to Azure Analysis Service or Power BI Premium
Other
27 stars 28 forks source link

Fix issue when deploying to the :rw Management Server #43

Closed yorickbouma closed 3 years ago

yorickbouma commented 3 years ago

In Azure Analysis Services it is possible to deploy to a special Management Server by using the special :rw (read-write) qualifier. This way you are able to deploy to the processing server without impacting your querying pool during deployment. After deployment you perform a synchronization to promote the changes in your processing server to the querying pool. Please see the scale-out documentation for more information https://docs.microsoft.com/en-us/azure/analysis-services/analysis-services-scale-out.

Currently when using this special qualifier the deployment tasks fails with the following error:

Error during adding firewall rule (Could not find server: '[servername]:rw' in any resource group in the currently selected subscription: [subscriptionid]. Please ensure this server exists and that the current user has access to it.)

This is happening because all the used cmdlets used for deployment work with this special qualifier but the Get-AzureRmAnalysisServicesServer and Set-AzureRmAnalysisServicesServer do not. These are being used to add and remove the firewall rule and they only work with the actual server name. Therfore, the :rw part should be stripped from the server name if it is there.

I created PR #42 with the fix.

liprec commented 3 years ago

I just uploaded v1.3.2 which contains your PR. If you can validate if it is working as expected.

yorickbouma commented 3 years ago

@liprec I can see that the extension has been updated: image However, the agents still seem to use to old version: image

Any idea how to force update this? I'm using Azure Pipelines hosted agents (vs2017-win2016).

liprec commented 3 years ago

What helped for my, but cannot validate if it is true, is to alter the pipeline and save a new version: add a space to a filled input field as those are trimmed before being saved, but it enabled the save button.

yorickbouma commented 3 years ago

Tried that + a completely new pipeline. No success so far... maybe it just takes some time...

liprec commented 3 years ago

Must say that I do not have no experience with self-hosted agents (if I recall it correctly). So probably patience is the best solution 😉

yorickbouma commented 3 years ago

I've just created a new Azure Subscription and a new Azure DevOps organization for the sole pupose testing this. I'm still only seeing the 1.3.1 version being used in this completely new environment.

image

Would it have to do with the fact that this file should be updated to for a new release? https://github.com/liprec/vsts-release-aas/blob/master/vss-extension.json

I'm not familiar with releasing these extensions so my apologies if this does not make sense whatsoever.

liprec commented 3 years ago

Unfortunately that is not the case as the entry in the Azure DevOps martketplace is disconnected from the code in GitHub. But you triggered me and I found that the individual tasks didn't had a new version number and waas still showing the 1.3.1 version. Now I have fixed this and updated the task to 1.3.3.

yorickbouma commented 3 years ago

Went on holiday so I was not able to test it until today. I hereby confirm that the extensions is now updated and it now successfully deploys to the :rw server!

Thanks for your effort!