Azure / Azure/azure-functions-host
Container specialization fails silently on container restart in Linux Consumption
- Dominant language
- C#
- Stars
- 2k
- Forks
- 482
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 38
Description
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.
Contributor guide
Research direction
Start at src/WebJobs.Script.WebHost/ContainerManagement/LinuxContainerInitializationHostService.cs around line 78 and compare the restart logs with the SAS URI handling described in the issue. Trace the specialization failure path and verify that a failed container specialization is surfaced through an explicit diagnostic rather than the misleading "No host context specified" message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100