Skip to content

Adding to an AppService a mount to an inexistent Azure FileShare doesn't produce an error (but breaks the appService instance) #21721

@0gust1

Description

@0gust1

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

Describe the bug
The following command should return an error when <FILE_SHARE_NAME> doesn't exist in the target storage account:

az webapp config storage-account add -g <RESSOURCE_GROUP_NAME> -n <APP_SERVICE_NAME> --custom-id "test-az-cli" --storage-type AzureFiles --account-name <STORAGE_ACCOUNT_NAME> --share-name <FILE_SHARE_NAME> --access-key <STORAGE_ACCOUNT_ACCESS_KEY> --mount-path <MOUNT_PATH_ON_APP_SERVICE_FS> --debug

When ran on an existing appService, the above command put the appService in a semi-broken state where Kudu become.unavailable and deployments are not working anymore

To Reproduce

  • Create a storage account
  • Create an appService instance
  • run the above command with the right parameters and a non-existent fileshare name.
  • try to deploy some code to the app, or try to ssh into it (webSSH), or try to look at deployment logs, or try to access Kudu UI (https://<appServiceInstanceName>.scm.azurewebsites.net ) : everything should fail

Expected behavior

  • az webapp config storage-account add should fail / return an error when specifying an inexistent File_share.
  • the endpoint of Azure management API https://management.azure.com/subscriptions/<subscriptionID>/resourceGroups/<RG_NAME>/providers/Microsoft.Web/sites/<APP_NAME>/config/azurestorageaccounts/add should return an error as well

Environment summary

  • AppService Linux (Node in our case)
  • we use terraform to provision our infra (but the problem was reproduced with azure-cli)

Additional context

N/A

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions