projectkudu / kudu

Kudu is the engine behind git/hg deployments, WebJobs, and various other features in Azure Web Sites. It can also run outside of Azure.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WEBJOB_STOPPED app setting ignored when swapping deployment slots

opened this issue · comments

I have two deployment slots: "production" and "maintenance". The maintenance slot has an app setting WEBJOB_STOPPED = 1, sticky to the deployment slot:
{ "name": "WEBJOB_STOPPED", "value": "1", "slotSetting": true }

On "production" I have a .NET app service with a few WebJobs. When I swap the slots I would expect the WebJobs to be stopped due to WEBJOB_STOPPED = 1 on the "maintenance" slot. However, the WebJobs are immediately started after the swap (shown as running in the App Service's "WebJobs" blade and in the Kudu WebJobs dashboard.

I swap the slots in an Azure DevOps pipeline using the "Azure App Service manage" task. The pipeline is built as follows:

  1. "production" slot is deployed and started with my app, "maintenance" slot is stopped
  2. Deploy a maintenance page to "maintenance" slot and start slot.
  3. Swap slots
  4. Stop "maintenance" slot. -> Here I would expect the WebJobs to be stopped as well du to the "WEBJOB_STOPPED = 1" setting, but they are started right after the swap. The app settings of the "maintenance" slot show the correct "WEBJOB_STOPPED = 1" app setting but it is somehow ignored :-(

Hi

If the problem persists and is related to running it on Azure App Service, please open a support incident in Azure:
https://learn.microsoft.com/en-us/azure/azure-portal/supportability/how-to-create-azure-support-request

This way we can better track and assist you on this case

Thanks,

Joaquin Vano
Azure App Service