Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure functions swap functionality is not working after enabling private endpoint for function app linked storage

Azure functions swap functionality is not working after enabling private endpoint(with selected networks option) for function app linked storage account(webjobstorage)

Created private endpoint for blob, file and table storage

Below are the additional app settings I am adding

{
    "name": "WEBSITE_CONTENTOVERVNET",
    "value": "1",
    "slotSetting": false
  },
  {
    "name": "WEBSITE_CONTENTSHARE",
    "value": "production",
    "slotSetting": false
  },
  {
    "name": "WEBSITE_DNS_SERVER",
    "value": "168.63.129.16",
    "slotSetting": false
  },
  {
    "name": "WEBSITE_VNET_ROUTE_ALL",
    "value": "1",
    "slotSetting": false
  }

Referred this article Secure storage account linked to Function App with private endpoint

From the azure devops I am trying to deploy the code to staging slot first, then later I am swapping it with prod slot. at this step it is failing.

Tried to swap it from the portal that also failed.

I am getting below error

From devops swap task :

##[error]Error: Failed to swap App Service 'testmgmt-fa-min-go' slots - 'staging' and 'production'. Error: InternalServerError - There was an unexpected error swapping slots 'staging' and 'production' for site 'testmgmt-fa-min-go(staging)'. Please try to cancel your swap operation. (CODE: 500)

From Portal:

enter image description here

like image 420
KSP Avatar asked Sep 16 '25 13:09

KSP


1 Answers

The fix is deployed but we had to introduce a new app setting that you should set on your production slot (or the swap slot if you're swapping between two subslots) called WEBSITE_OVERRIDE_STICKY_DIAGNOSTICS_SETTINGS and set it to 0 (zero). I.e.,

WEBSITE_OVERRIDE_STICKY_DIAGNOSTICS_SETTINGS=0

This will allow you to swap the slots when the storage account is network restricted. Here is our documentation on app settings. This should not have any impact on your Azure Monitor related diagnostics settings configuration and is related to the legacy Application Log Settings configuration, which was preventing Premium Functions slot swaps from occurring.

Next steps on our side are:

  • We will add to our backlog a work item for this setting to defaulted for Premium Functions, so you won't have to add it but currently no ETA for this, so the above is the current final solution.
  • We will add the app setting to our App Settings list documentation
like image 168
Thiago Avatar answered Sep 18 '25 11:09

Thiago