Skip to content
This repository has been archived by the owner on Jun 30, 2022. It is now read-only.

deploy script errs out with "The specified app service plan was not found" #2762

Closed
rob-derosa opened this issue Nov 27, 2019 · 21 comments
Closed
Assignees
Labels
Type: Bug Something isn't working

Comments

@rob-derosa
Copy link
Member

What project is affected?

Virtual Assistant Template

What language is this in?

C#

What happens?

deploy.ps1 fails every time with the following json regardless of the input parameters

{ "error": { "additionalInfo": null, "code": "InvalidTemplateDeployment", "details": [ { "additionalInfo": null, "code": "ValidationForResourceFailed", "details": [ { "additionalInfo": null, "code": "ServerFarmNotFound", "details": null, "message": "The specified app service plan was not found.", "target": null } ], "message": "Validation failed for a resource. Check 'Error.Details[0]' for more information.", "target": null } ], "message": "The template deployment 'deployment_dry_run' is not valid according to the validation procedure. The tracking id is 'af4be6f7-cdd6-448d-9867-8a4bd0ac952c'. See inner errors for details.", "target": null }, "properties": null }

What are the steps to reproduce this issue?

Run deploy.ps1 in powershell 6.2.3 and enter the params as prompted

What were you expecting to happen?

Services to be deployed.

Can you share any logs, error output, etc.?

Included.

Any screenshots or additional context?

@rob-derosa rob-derosa added Needs Triage Needs to be triaged for assignment Type: Bug Something isn't working labels Nov 27, 2019
@rob-derosa
Copy link
Member Author

rob-derosa commented Nov 27, 2019

pwsh output:

PS /Volumes/Data/Projects/Wendys/Bot/VirtualAssistantSample> ./Deployment/Scripts/deploy.ps1
Bot Name (used as default name for resource group and deployed resources): robtestbot98776r
Azure resource group region: westus
Password for MSA app registration (must be at least 16 characters long, contain at least 1 special character, and contain at least 1 numeric character): RandoPwd......3!24jgjd
LUIS Authoring Region (westus, westeurope, or australiaeast): westus
LUIS Authoring Key (found at https://luis.ai/user/settings): ebfff00807a54....e5ea246974
Creating resource group ...
Validating Azure deployment ...
Template is not valid with provided parameters. Review the log for more information.
Error: The template deployment 'deployment_dry_run' is not valid according to the validation procedure. The tracking id is '0e9e5f83-2b8a-4442-a5c5-080cccb6fab6'. See inner errors for details.
Log: /Volumes/Data/Projects/Wendys/Bot/VirtualAssistantSample/Deployment/Scripts/../deploy_log.txt
To delete this resource group, run 'az group delete -g robtestbot98776r --no-wait'
PS /Volumes/Data/Projects/Wendys/Bot/VirtualAssistantSample>

@rob-derosa
Copy link
Member Author

I tried a manual deployment using ARM and it errs out w/ the same error message.

@lauren-mills
Copy link
Contributor

Hi @rob-derosa, this looks like an issue with the QnA Maker service in Azure. I have reached out to the team and will update this issue as soon as I hear back.

In the meantime, you might need to removed the QnA services from the arm template in order to get the deployment working.

@lauren-mills lauren-mills self-assigned this Nov 27, 2019
@lauren-mills lauren-mills removed the Needs Triage Needs to be triaged for assignment label Nov 27, 2019
@rob-derosa
Copy link
Member Author

Where does the arm template live? I couldn't find one in the template.

@lauren-mills
Copy link
Contributor

Its Deployment\Resources\template.json

@rob-derosa
Copy link
Member Author

rob-derosa commented Nov 27, 2019

Gotcha. Updated to remove QnA references and deployment worked. Thanks for the workaround.

@lauren-mills
Copy link
Contributor

Update: This appears to only be affecting westus, so changing to another region is another workaround.

@tamerin-tech
Copy link

same error on westeurope @lauren-mills

@lauren-mills
Copy link
Contributor

@tamerin-tech - I was just able to deploy to westeurope using the arm template. Can you send any logs across?

@lauren-mills
Copy link
Contributor

Ok, the team has gotten back on the issue.

Try changing this line to this:

"serverFarmId": "[concat('/subscriptions/', Subscription().SubscriptionId,'/resourcegroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', parameters('appServicePlanName'))]",

Let me know if it resolves the issue.

@Batta32
Copy link
Collaborator

Batta32 commented Dec 5, 2019

Hi @lauren-mills! We successfully deployed a Virtual Assistant with your suggestion.

In the case of the TypeScript Virtual Assistant is the following line.

image

Should we update the deployment scripts for the TypeScript solutions or just wait to confirm these changes?

@lauren-mills
Copy link
Contributor

I'm working on some other updates, so I'll take care of it at the same time! Thanks

@damaca
Copy link

damaca commented Dec 19, 2019

Guys, I hit this same issue today in one of my subscription and with the change @lauren-mills said it's working but.....yesterday I used the very same code (which I'm using for more than a year) in another subscription (and region) and it worked.
¿how is this possible?
¿how you can make this kind of breaking changes in an "interface" suddenly?

It's pretty difficult keep all the stuff automated with these issues

@darrenj
Copy link
Contributor

darrenj commented Dec 19, 2019

There were some regional operational issues with QnAMaker which were then addressed so should be resolved. We also updated scripts

@damaca
Copy link

damaca commented Jan 3, 2020

This still happens. In some regions seems to work the "old way". Which one is "the good one"?

@sowsan
Copy link

sowsan commented Jan 3, 2020

Ok, the team has gotten back on the issue.

Try changing this line to this:

"serverFarmId": "[concat('/subscriptions/', Subscription().SubscriptionId,'/resourcegroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', parameters('appServicePlanName'))]",

Let me know if it resolves the issue.

This helped me to resolve the issue. I will also take the latest template/script as it seems fixed in it.

@shortboard
Copy link

shortboard commented Feb 10, 2020

I've just run into this issue today and was chasing my tail all morning as i'd made some other changes to my ARM template on Friday and I thought it was related to that. Thankfully @lauren-mills suggestion solved it for now.

@matendie
Copy link

matendie commented Feb 21, 2020

I just ran in to this issue my self.
I needed to reduce the path of server farm reference before the AppServicePlanName
expected value is "resourceId('Microsoft.Web/serverfarms"

web app section that is working now fine:
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('AppServicePlanName'))]",

Hope it helps someone

@crgarcia12
Copy link

I had this issue today and the reason was a mismatch in the "location" - make sure you are intelligent and are using the same location across all your resources... not like me :)

@dhabaleswar-prusty
Copy link

"[concat('/subscriptions/', Subscription().SubscriptionId,'/resourcegroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', parameters('appServicePlanName'))]",

@dhabaleswar-prusty
Copy link

This reply by lauren-mills saved my day. Just that parameters('appServicePlanName') may have to be replaced with variables('') if the name is retrieved from variables, not from parameters.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests