Azure / azure-functions-host

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

Container specialization fails silently on container restart in Linux Consumption #6866

Open divyagandhisethi opened 4 years ago

divyagandhisethi commented 4 years ago

This came up in a recent CRI - we can fail to specialize from SAS uri silently.

Sample logs:

- 2020-10-22 20:29:54.5550000   WebHost has shut down. Will attempt restart.
- 2020-10-22 20:29:54.5560000   Starting Functions WebHost. Attempt 1.
- 2020-10-22 20:29:57.2467056   Creating StandbyMode placeholder function directory (/tmp/functions\standby\wwwroot)
- 2020-10-22 20:29:57.2638501   StandbyMode placeholder function directory created
- 2020-10-22 20:29:57.2697033   Initializing LinuxContainerInitializationService.
- 2020-10-22 20:29:57.2736232   Host context specified via CONTAINER_START_CONTEXT_SAS_URI
- 2020-10-22 20:29:57.6278794   No host context specified. Waiting for host assignment

The issue seems to be in this line: https://github.com/Azure/azure-functions-host/blob/95dc10e7e5ee1258eb60ca8d22ce42faa776d1ca/src/WebJobs.Script.WebHost/ContainerManagement/LinuxContainerInitializationHostService.cs#L78

We should not be failing silently here.

balag0 commented 4 years ago

If you could clarify, is this workitem just to log with error/warning log level or something more?

divyagandhisethi commented 4 years ago

If you could clarify, is this workitem just to log with error/warning log level or something more?

This is a repair item for a CRI. The fix needed is upto you.