Azure / azure-functions-host

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

[Linux Consumption] HostId generation logic should be cloud specific #8788

Open balag0 opened 2 years ago

balag0 commented 2 years ago

https://github.com/Azure/azure-functions-host/blob/dev/src/WebJobs.Script/Host/ScriptHostIdProvider.cs#L68

Code assumes the dns suffix will always be azurewebsites.net. Breaks on other clouds with different suffixes.

Exception Stack trace for Python Functions App + Blob Trigger + Linux Consumption running in fairfax - ICM https://portal.microsofticm.com/imp/v3/incidents/details/319380431/home

Azure.RequestFailedException : The specifed resource name contains invalid characters. RequestId:7ffb25bd-0003-0073-7d7c-ad4f51000000 Time:2022-08-11T12:18:30.7949544Z Status: 400 (The specifed resource name contains invalid characters.) ErrorCode: InvalidResourceName  Content: <?xml version='1.0' encoding='utf-8'?><Error><Code>InvalidResourceName</Code><Message>The specifed resource name contains invalid characters. RequestId:7ffb25bd-0003-0073-7d7c-ad4f51000000 Time:2022-08-11T12:18:30.7949544Z</Message></Error>  Headers: Server: Windows-Azure-Queue/1.0,Microsoft-HTTPAPI/2.0 x-ms-request-id: 7ffb25bd-0003-0073-7d7c-ad4f51000000 x-ms-version: 2018-11-09 x-ms-error-code: InvalidResourceName Date: Thu, 11 Aug 2022 12:18:30 GMT Content-Length: 243 Content-Type: application/xml
     at async Azure.Storage.Queues.QueueRestClient.GetPropertiesAsync(Nullable`1 timeout,CancellationToken cancellationToken)
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    at async Azure.Storage.Queues.QueueClient.GetPropertiesInternal(Boolean async,CancellationToken cancellationToken,String operationName)
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    at async Azure.Storage.Queues.QueueClient.ExistsInternal(Boolean async,CancellationToken cancellationToken)
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    at async Azure.Storage.Queues.QueueClient.ExistsAsync(CancellationToken cancellationToken)
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    at async Microsoft.Azure.WebJobs.Extensions.Storage.Common.Listeners.QueueListener.ExecuteAsync(CancellationToken cancellationToken)
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    at async Microsoft.Azure.WebJobs.Extensions.Storage.Common.Timers.TaskSeriesTimer.RunAsync(CancellationToken cancellationToken)
fabiocav commented 2 years ago

@balag0 can you please go into more details? I understand the logic won't apply as expected, but what exactly is the error you're seeing in the other clouds?

pragnagopa commented 2 years ago

@fabiocav / @balag0 - updated issue description with ICM link and the exception stack.