Hello,
We are currently trying to deploy 3 functions to a linux app service plan. The functions are a mix of different triggers such as timer, http and storage queue.
Each function has a staging and production slot and each slot has a private endpoint setup. Each slot also has vnet integration and route all vnet traffic enabled.
Each function also has a separate storage account and each storage account has 2 private endpoints setup for blob and file access - I believe this is needed for the function to work.
We have a self hosted build agent connected to the vnet and this uses a managed identity to perform the deployment through an azure devops pipeline.
The situation we find ourselves in is that we can deploy fine to the staging slot, however when it comes to swapping from the staging slot to the production slot we get various errors.
The most common error is this and normally fails after 20 minutes
##[error]Error: Failed to swap App Service '<function name>' slots - 'staging' and 'production'. Error: ExpectationFailed - Cannot swap site slots for site '<function name>' because the 'staging' slot did not respond to http ping. (CODE: 417)
Researching the issue yields the following configuration that might be missing
WEBSITE_CONTENTAZUREFILECONNECTIONSTRING
Which we have tried with and without this setting (assuming it should be the same storage account configured in AzureWebJobsStorage).
Research also takes me to this recently closed github issue [https://github.com/Azure/azure-functions-host/issues/8448
which states to try an undocumented configuration
WEBSITE_OVERRIDE_STICKY_DIAGNOSTICS_SETTINGS
but this doesn't work either.
Does anyone know of any comprehensive documentation on how to setup a function and function storage both secured by private endpoints and vnet integration? Or can anyone shed any light on the issues we are facing?
Just to add, we are unable to swap the slots via the portal. We also have a web app hosted on the same app service plan which we can deploy and swap slots fine.