Azure / Azure/azure-cli

Deploying a Function App with --deployment-container-image-name can result in a Function App that will not start.

Open
#21,157 11 comments 0 reactions 0 assignees View on GitHub
act-observability-squad bug Functions Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

> ### `az feedback` auto-generates most of the information requested below, as of CLI version 2.0.62

**Describe the bug**
The validation for --deployment-container-image-name can result in a Function App that will start as it sets the LinuxFxVersion correctly.

The linuxFxVersion should be /imagename:tags>

The validation logic at https://github.com/Azure/azure-cli/blob/6c1b085a0910c6c2139006fcbd8ade44006eb6dd/src/azure-cli/azure/cli/command_modules/appservice/custom.py#L1227 doesn't seem to check this for the Functions scenarios.

**To Reproduce**

1. Install the newest Az Cli.
2. Create a Storage Account, Resource Group and Managed Identity.
3. Run this command.

az functionapp create --name --resource-group \\
--storage-account \\
--plan \\
--assign-identity

4. You will see a Function App that is created but has no Functions and returns a Server error.
5. The internal logs show the docker pull is failing/
6. Updating the Linux Fx Version to DockerId/imagename:tags works.

**Expected behavior**
1. That the Function App starts.

**Environment summary**
Reproduced using the Azure Cloud Shell.

**Additional context**
https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-function-linux-custom-image
https://docs.microsoft.com/en-us/azure/app-service/configure-custom-container?pivots=container-linux#change-the-docker-image-of-a-custom-container

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.