Closed KellyChesco closed 12 months ago
Did you also try azd env set AZURE_SEARCH_SERVICE_RESOURCE_GROUP group-name
? I assume that service is in a different resource group than the new one being created.
No we didn't but we just tried it with the AZURE_SEARCH_SERVICE_RESOURCE_GROUP set and got the same result. It tries to create a search service "service 'chesco-cog-search' because a service with this name is already in use"
AZURE_ENV_NAME="azure-search-openai-demo" AZURE_LOCATION="eastus" AZURE_SEARCH_SERVICE="chesco-cog-search" AZURE_SEARCH_SERVICE_RESOURCE_GROUP="AzureCognitiveSearch" AZURE_SUBSCRIPTION_ID="xxxxxxxx-xxxxx-xxxxx-xxxx-xxxxxxxxxxxxxx"
ERROR: deployment failed: failing invoking action 'provision', error deploying infrastructure: deploying to subscription:
Deployment Error Details: InvalidTemplateDeployment: The template deployment 'search-service' is not valid according to the validation procedure. The tracking id is 'df9916f5-cae4-44f1-8873-54d950799646'. See inner errors for details. ServiceNameUnavailable: Cannot provision service 'chesco-cog-search' because a service with this name is already in use, or another request to provision a service with this name is still in progress
TraceID: 29a512f250089f6bbe8c6badb6db7605
We realized the AZURE_SEARCH_SERVICE_RESOURCE_GROUP was wrong for our existing resource group so we changed to. AZURE_SEARCH_SERVICE_RESOURCE_GROUP="AzureCognitiveSearch" To AZURE_SEARCH_SERVICE_RESOURCE_GROUP="DCIS"
Then we reran "AZD up" and got the following error
(✓) Done: Storage account: stpeqbrk6t7qg36 (✓) Done: App Service plan: plan-peqbrk6t7qg36 (✓) Done: Form recognizer: cog-fr-peqbrk6t7qg36 (✓) Done: Azure OpenAI: cog-peqbrk6t7qg36
ERROR: deployment failed: failing invoking action 'provision', error deploying infrastructure: deploying to subscription:
Deployment Error Details: BadRequest: Cannot update sku for an existing search service. RequestId: 16176beb-f57d-c346-35af-182e02eaaaff
TraceID: 16176bebf57dc34635af182e02eaaaff | | Creating/Updating resources
Hm, our main.bicep makes a service with sku "standard", due to this line:
param searchServiceSkuName string = 'standard'
You'll need to change that line to match your existing one. The options are listed here: https://learn.microsoft.com/en-us/azure/templates/microsoft.search/searchservices?pivots=deployment-language-bicep#sku
Hi Pamela,
We actually found that and made that change, and in a couple other files yesterday after poking around a bit.
[infra/core/search/search-services.bicep] param sku object = { name: 'standard' }
[infra/main.parameters.json] "searchServiceSkuName": { "value": "standard" },
Unfortunately none of these changes worked. We mostly got errors like this:
(✓) Done: Storage account: stpeqbrk6t7qg36 (✓) Done: App Service plan: plan-peqbrk6t7qg36 (✓) Done: Form recognizer: cog-fr-peqbrk6t7qg36 (✓) Done: Azure OpenAI: cog-peqbrk6t7qg36
ERROR: deployment failed: failing invoking action 'provision', error deploying infrastructure: deploying to subscription:
Deployment Error Details: BadRequest: Cannot update sku for an existing search service. RequestId: 16176beb-f57d-c346-35af-182e02eaaaff
Oddly enough changing one of them, I wish I could remember which, triggered an unexpected error below deploying the text embedding resource ada.
ERROR: deployment failed: failing invoking action 'provision', error deploying infrastructure: deploying to subscription:
Deployment Error Details: BadRequest: Resource identity is not supported for the selected SKU InvalidTemplateDeployment: The template deployment 'openai' is not valid according to the validation procedure. The tracking id is '2faf22b4-9231-4acd-9654-bf32c2fa11c3'. See inner errors for details. InvalidResourceProperties: The specified SKU 'Free' of account deployment is not supported by the model 'text-embedding-ada-002' version: '2'.
We switched it back and the last message we received before calling it a day was another odd one
Deployment Error Details: InvalidTemplateDeployment: The template deployment 'search-service' is not valid according to the validation procedure. The tracking id is 'abb56b6f-c52e-4fdc-bbcb-5019bbcbc889'. See inner errors for details. ServiceNameUnavailable: Cannot provision service 'chesco-cog-search' because a service with this name is already in use, or another request to provision a service with this name is still in progress
We can see here it trying to deploy to the correct resource group
https://i.imgur.com/NriakM1.png
But fails with the message: Cannot update sku for an existing search service. RequestId: 1511cdd3-7ea3-6d4a-d0b4-d3e010a54011 (Code: BadRequest)
@KellyChesco Sorry it's been a pain. I've tested it out myself and sent a PR that should make it slightly easier: https://github.com/Azure-Samples/azure-search-openai-demo/pull/620
Basically, you'll need to override all of the parameters that differ from the default - search service name, search service resource group, search service location, search service SKU.
I wonder if you accidentally changed the OpenAI sku instead of the search service SKU? That's usually S0 in our code, and I believe that's the only option.
@pamelafox No worries, It was working well with the default settings but we are still evaluating and during that period need to use the free tier if possible.
Thanks for the env settings, we set them all but it looks like its trying to update the current sku in the existing search service with the same value and that doesn't seem possible? Do you know if anyone else has been able to use an existing free teir successfully?
AZURE_ENV_NAME="azure-search-openai-demo" AZURE_LOCATION="eastus" AZURE_SEARCH_SERVICE="chesco-cog-search" AZURE_SEARCH_SERVICE_LOCATION="East US" AZURE_SEARCH_SERVICE_RESOURCE_GROUP="DCIS" AZURE_SEARCH_SERVICE_SKU="Free"
ERROR: deployment failed: failing invoking action 'provision', error deploying infrastructure: deploying to subscription:
Deployment Error Details: BadRequest: Cannot update sku for an existing search service. RequestId: 09cfaf41-a8e0-f04e-fbf6-df828ce16f61
TraceID: 09cfaf41a8e0f04efbf6df828ce16f61
also tried but got the same results
AZURE_ENV_NAME="azure-search-openai-demo" AZURE_LOCATION="eastus" AZURE_SEARCH_SERVICE="chesco-cog-search" AZURE_SEARCH_SERVICE_LOCATION="eastus" AZURE_SEARCH_SERVICE_RESOURCE_GROUP="DCIS" AZURE_SEARCH_SERVICE_SKU="Free"
Ah, I'm trying with a free search service now, and I realize that free search service does not support semantic search or managed identity: https://learn.microsoft.com/en-us/azure/search/search-sku-tier#feature-availability-by-tier
Given that, a free search service isn't currently compatible with this sample, you'd have to use a higher tier. Sorry! I'll ask the team if there are any plans to enable managed identity for that tier.
Thanks Pamela, great find. We will revaluate our deployment plan.
FYI, I found the document I initially read that led me to think there was a free tier for Semantic Search. https://azure.microsoft.com/en-us/pricing/details/search/
@pamelafox So the Basic tier of search service is sufficient with this sample?
@KellyChesco Ah, thats confusing because there are tiers for semantic search that are different than the tiers for Azure Cognitive Search, and both have a free tier level. I agree that's confusing, I'll pass your feedback on.
@pmtang Yes, basic should be fine, it seems to support managed identity and semantic search. https://learn.microsoft.com/en-us/azure/search/search-sku-tier#feature-availability-by-tier
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this issue will be closed.
The README now mentions that free sku doesn't work, so there's no additional work we can do on this issue, as far as I can see.
Sorry to reopen this but it doesn't appear that you can change the SKU of an already existing Search Service:
Good to know, thanks for the link! Is there anywhere particular in the readme you think that should be mentioned? Or something you hoped we could do on the code side?
Hi Pamela,
Happy to help. I would just make a note of this in the Readme, in the section about using an Existing Azure AI Search resource. Point 4 would need to be reworked to say that if the resource isn't in a supported SKU, it will need to be re-deployed as it is not possible to change the SKU of an already running AI Search instance.
Great point, adding note in https://github.com/Azure-Samples/azure-search-openai-demo/pull/1019
This issue is for a: (mark with an
x
)Minimal steps to reproduce
Any log messages given by the failure
Deployment Error Details: InvalidTemplateDeployment: The template deployment 'search-service' is not valid according to the validation procedure. The tracking id is '9050f6ed-e5c4-4144-8580-774cf6cdfe04'. See inner errors for details. ServiceNameUnavailable: Cannot provision service 'chesco-cog-search' because a service with this name is already in use, or another request to provision a service with this name is still in progress
Expected/desired behavior
OS and Version?
azd version?
Versions
Mention any other details that might be useful