Azure / Azure/azure-functions-host

Do not shutdown Host on hard failures that need user actions

Open
#8,746 9 comments 0 reactions 1 assignee Claimed by @brettsam View on GitHub
blocked
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 12h
Merged PRs (30d)
38

Description

1. For issues with [host-id-collisions](https://github.com/Azure/azure-functions-host/wiki/Host-IDs#host-id-collisions) -

Functions Host is shutdown here:

https://github.com/Azure/azure-functions-host/blob/a14c989a5f1d736478f3c4d4be9b2b5ea4dda6ef/src/WebJobs.Script/Host/HostIdValidator.cs#L129

2. For issues with App Content Initialization on the platform - `Shutting down host due to presence of C:\home\site\wwwroot\FAILED TO INITIALIZE RUN FROM PACKAGE.txt`

Functions Host is shutdown here:

https://github.com/Azure/azure-functions-host/blob/a14c989a5f1d736478f3c4d4be9b2b5ea4dda6ef/src/WebJobs.Script.WebHost/WebJobsScriptHostService.cs#L204

Both these are fatal errors i.e. User needs to take action to fix the app content / hostId.

Ask: Instead of shutting down the host, leave host running in [Error State](https://github.com/Azure/azure-functions-host/blob/dev/src/WebJobs.Script/Host/ScriptHostState.cs#L33) - this will allow

1. Platform components such as Scale Controller to ping the functions host status end point and ensure scaling requests are not made beyond one worker
2. As of now DWAS continues to restart the functions host - this fix will avoid cycles in DWAS to attempt restarts on hard failure

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.