Azure / azure-cli

Azure Command-Line Interface
MIT License
4.03k stars 3.01k forks source link

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

Open 0gust1 opened 2 years ago

0gust1 commented 2 years ago

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 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

Expected behavior

Environment summary

Additional context

N/A

yonzhan commented 2 years ago

route to CXP team

navba-MSFT commented 2 years ago

@0gust1 Apologies for the late reply. Thanks for sharing the feedback. We will involve the Service Team to look into this issue.

ghost commented 2 years ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @antcp, @AzureAppServiceCLI.

Issue Details
> ### `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 doesn't exist in the target storage account: `az webapp config storage-account add -g -n --custom-id "test-az-cli" --storage-type AzureFiles --account-name --share-name --access-key --mount-path --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://.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//resourceGroups//providers/Microsoft.Web/sites//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
Author: 0gust1
Assignees: -
Labels: `Web Apps`, `Service Attention`, `App Services`, `customer-reported`, `CXP Attention`, `Auto-Assign`
Milestone: Backlog