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:
- "production" slot is deployed and started with my app, "maintenance" slot is stopped
- Deploy a maintenance page to "maintenance" slot and start slot.
- Swap slots
- 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