Azure / azure-functions-host

The host/runtime that powers Azure Functions
https://functions.azure.com
MIT License
1.94k stars 442 forks source link

Host ID collisions in several functionapps and slots although Environment variable "AzureFunctionsWebHost__hostid" is used in every functionapp and every slot #10650

Open ulluoink opened 9 hours ago

ulluoink commented 9 hours ago

Repro steps

  1. several FunctionApps in one storage account with two deployment slots each (staging and production)
  2. in every functionapp and in each slot we have an environment variable "AzureFunctionsWebHost__hostid" with a unique value (just like documented by microsoft)
  3. deploy several FunctionApps to their staging slot
  4. switch slot of each function to production
  5. Error "A collision for Host ID 'functionsv4x64dotnetisolated8pla' was detected in the configured storage account. For more information, see https://aka.ms/functions-hostid-collision." occurs in several functionapps (either in production or in staging slot). The 'functionsv4x64dotnetisolated8pla' value differs from functionapp to functionapp

Expected behavior

no host id collision errors if the environment variable is used as documented

Documentation we used to address this issue:

https://learn.microsoft.com/en-us/azure/azure-functions/storage-considerations?tabs=azure-cli#override-the-host-id https://learn.microsoft.com/en-us/azure/azure-functions/errors-diagnostics/diagnostic-events/azfd0004#options-for-addressing-collisions https://github.com/Azure/azure-functions-host/wiki/Host-IDs#host-id-override