Azure / Azure/azure-functions-host

[Linux Consumption] Successful slot swaps automatically reverted after a few minutes

Open
#7,336 8 comments 1 reaction 1 assignee Assigned to @soninaren View on GitHub
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 12h
Merged PRs (30d)
38

Description

> I know I've listed `n/a` a few times in this issue, but that's because this has nothing to do with the code or a specific invocation of the function. This happens with the default Node.js function app project created in VS Code... looks more like a runtime/host issue than a code issue.

#### Investigative information

Please provide the following:

- Timestamp: n/a
- Function App version: ~3
- Function App name: totalview-playground4-linux-consumption
- Function name(s) (as appropriate): all
- Invocation ID: n/a
- Region: East US

#### Repro steps

Provide the steps required to reproduce the problem:

1. Create new Azure Function Linux Consumption app service
2. Create a 2nd deployment slot **staging**
3. Deploy app to **staging** slot

> test function... this works

4. Swap slots & wait for the process to complete
5. Observe the functions are now listed under the production slot:

![image](https://user-images.githubusercontent.com/2068657/117044479-7c1d2700-acdc-11eb-8817-37d0c75911e6.png)

6. Wait a few minutes (~5-10... usually I see this around 9m after the successful slot deployment)
7. Retry the function on the production slot = failure
8. Observe the functions are no longer listed on the production slot:

![image](https://user-images.githubusercontent.com/2068657/117044622-a66ee480-acdc-11eb-8122-a40db1313ee1.png)

9. go back and list functions on the staging slot... observe a phantom swap has occurred

#### Expected behavior

Expect that after a successful slot swap, the swap isn't reverted.

#### Actual behavior

See repro steps.

#### Known workarounds

Don't use Linux Consumption plan... if I create an Windows Consumption plan, it works as expected.

#### Related information

* Programming language used: Node.js
* Links to source: n/a
* Bindings used: HTTP trigger

For the Q/A on this issue that led me here to post a bug, please see the following. I've included all details in this issue, but including this to show others have had the same experience.
https://docs.microsoft.com/en-us/answers/questions/382139/az-function-consumption-plan-reverts-production-sl.html

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.