question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

az-cli v 2.34.1: az webapp deployment slot create -- errors when configuration-source has a path-mapping to storage

See original GitHub issue

Describe the bug

We upgraded az-cli from 2.33.1 to 2.34.1 and it broke our app service deployment pipeline, at the point where it creates a deployment slot. It seems to be because the az-cli command is attempting to copy the azure-blob mapping information over to the slot. It is erroring with the message “Required parameter AccessKey is missing.”, even though there is no available AccessKey parameter for the az webapp deployment slot create command.

As a result, the slot gets created, but it is incomplete. Not all the configuration gets copied over from the configuration source.

To Reproduce

  1. Create an app service. In Configuration Path mappings mount an AzureBlob account with an Access key.
  2. Use az-cli to create a staging slot. for the configuration source, use the app service you created.

Expected behavior

A deployment slot gets created and all the config info gets copied over from the app service. Environment summary

az-cli 2.34.1 on DOS or LINUX (happens on both) Additional context

I ran the failing command with the --debugging flag and I can see where it is failing: cli.azure.cli.core.sdk.policies: {“properties”: {“numberOfWorkers”: 1, “defaultDocuments”: [] …,xxxxxprivateinfoxxxxxxxxxx … “http20Enabled”: true, “minTlsVersion”: “1.2”, “scmMinTlsVersion”: “1.0”, “ftpsState”: “Disabled”, “preWarmedInstanceCount”: 0, “functionAppScaleLimit”: 0, “functionsRuntimeScaleMonitoringEnabled”: false, “minimumElasticInstanceCount”: 0, “azureStorageAccounts”: {“lucene-index”: {“type”: “AzureBlob”, “accountName”: “xxxprivateinfo”, “shareName”: “xxxprivateinfo”, “mountPath”: “/tmp/lucene”}}}} urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443 urllib3.connectionpool: https://management.azure.com:443 “PATCH /subscriptions/xxxprivateinfo/web?api-version=2021-03-01 HTTP/1.1” 400 391 cli.azure.cli.core.sdk.policies: Response status: 400 cli.azure.cli.core.sdk.policies: Response headers: cli.azure.cli.core.sdk.policies: ‘Cache-Control’: ‘no-cache’ cli.azure.cli.core.sdk.policies: ‘Pragma’: ‘no-cache’ cli.azure.cli.core.sdk.policies: ‘Content-Length’: ‘391’ cli.azure.cli.core.sdk.policies: ‘Content-Type’: ‘application/json; charset=utf-8’ cli.azure.cli.core.sdk.policies: ‘Expires’: ‘-1’ cli.azure.cli.core.sdk.policies: ‘ETag’: ‘“1D849DB703AD940”’ cli.azure.cli.core.sdk.policies: ‘Strict-Transport-Security’: ‘max-age=31536000; includeSubDomains’ cli.azure.cli.core.sdk.policies: ‘Server’: ‘Microsoft-IIS/10.0’ cli.azure.cli.core.sdk.policies: ‘X-AspNet-Version’: ‘4.0.30319’ cli.azure.cli.core.sdk.policies: ‘X-Powered-By’: ‘ASP.NET’ cli.azure.cli.core.sdk.policies: ‘x-ms-ratelimit-remaining-subscription-writes’: ‘1199’ cli.azure.cli.core.sdk.policies: ‘x-ms-request-id’: ‘5ab0772a-3e6a-4532-aadf-272fcb708596’ cli.azure.cli.core.sdk.policies: ‘x-ms-correlation-request-id’: ‘5ab0772a-3e6a-4532-aadf-272fcb708596’ cli.azure.cli.core.sdk.policies: ‘x-ms-routing-request-id’: ‘EASTUS:20220406T172627Z:5ab0772a-3e6a-4532-aadf-272fcb708596’ cli.azure.cli.core.sdk.policies: ‘X-Content-Type-Options’: ‘nosniff’ cli.azure.cli.core.sdk.policies: ‘Date’: ‘Wed, 06 Apr 2022 17:26:26 GMT’ cli.azure.cli.core.sdk.policies: Response content: cli.azure.cli.core.sdk.policies: {“Code”:“BadRequest”,“Message”:“Required parameter AccessKey is missing.”,“Target”:null,“Details”:[{“Message”:“Required parameter AccessKey is missing.”},{“Code”:“BadRequest”},{“ErrorEntity”:{“ExtendedCode”:“01010”,“MessageTemplate”:“Required parameter {0} is missing.”,“Parameters”:[“AccessKey”],“Code”:“BadRequest”,“Message”:“Required parameter AccessKey is missing.”}}],“Innererror”:null} cli.azure.cli.core.util: azure.cli.core.util.handle_exception is called with an exception: cli.azure.cli.core.util: Traceback (most recent call last):

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
StrawnSCcommented, Apr 20, 2022

I haven’t started work on a fix for this yet. I’ll see if I can get a fix for this in the May 2022 release

1reaction
apapajohncommented, Apr 18, 2022

Maybe I closed this by accident. Reopening.

Read more comments on GitHub >

github_iconTop Results From Across the Web

az webapp deployment slot | Microsoft Learn
Manage web app deployment slots. In this article. Commands; az webapp deployment slot auto-swap; az webapp deployment slot create; az webapp deployment slot...
Read more >
Deploy an Azure App Service - Octopus Server
This step was working for a while, deploying a container to the App Service, and it has suddenly stopped, and I'm not sure...
Read more >
Create Environment with Azure Deployment Slots - Medium
Use Azure Deployment Slots to create a new environment and automate ... $rg — slot dev — configuration-source $resourceaz webapp deployment ...
Read more >
Creating deployment slots and staging environments - YouTube
Video 4 of a 6-part series. Create an App Service deployment slot and staging environment to make changes to your Node web app...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found