Skip to content

Creating wrong dns records for the scm website for a private endpoint to a staging slot where the base website has more then 40 characters #20271

@JacobStruiksma

Description

@JacobStruiksma

This is autogenerated. Please review and update as needed.

Describe the bug

When creating a staging slot for a website where the base url has more then 40 characters the url of the staging slot is slightly different. See https://docs.microsoft.com/en-us/azure/app-service/deploy-staging-slots#add-a-slot the last paragraph:

The slot's URL will be of the format http://sitename-slotname.azurewebsites.net. To keep the URL length within necessary DNS limits, the site name will be truncated at 40 characters, the slot name will be truncated at 19 characters, and an additional 4 random characters will be appended to ensure the resulting domain name is unique.

When creating a private endpoint and adding the dns records for this website the regular staging slot url is properly created but the SCM website is based on http://sitename-slotname.azurewebsites.net and not the real url.

Command Name
az network private-endpoint dns-zone-group create

Errors:


To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • Put any pre-requisite steps here...
  • Create a website with more then 40 characters, create a staging slot
  • create a private endpoint
  • Add dns zone group for the private endpoint on the staging slot with the following command:
  • az network private-endpoint dns-zone-group create --resource-group {} --endpoint-name {} --name {} --private-dns-zone {} --zone-name {} --debug

The dns record for the staging website url is created as it should:
verylongexample-url-website-with-many-characters is trimmed with 40 characters and the staging name is added.

For the scm site, the full url name is used and not the 40 character trimmed url is used.

"recordSets": [
        {
          "fqdn": "verylongexample-url-website-with-many-ch-staging.privatelink.azurewebsites.net",
          "ipAddresses": [
            "10.28.154.39"
          ],
          "provisioningState": "Succeeded",
          "recordSetName": "verylongexample-url-website-with-many-ch-staging",
          "recordType": "A",
          "ttl": 10
        },
        {
          "fqdn": "verylongexample-url-website-with-many-characters-staging.scm.privatelink.azurewebsites.net",
          "ipAddresses": [
            "10.28.154.39"
          ],
          "provisioningState": "Succeeded",
          "recordSetName": "verylongexample-url-website-with-many-characters-staging.scm",
          "recordType": "A",
          "ttl": 10
        }
      ],

Expected Behavior

The dns record for the scm website should be the following url:
verylongexample-url-website-with-many-ch-staging.scm.privatelink.azurewebsites.net

Environment Summary

Windows-10-10.0.19041-SP0
Python 3.8.9
Installer: MSI

azure-cli 2.29.1 *

Extensions:
azure-devops 0.18.0
log-analytics 0.2.2
portal 0.1.2

Additional Context

Metadata

Metadata

Assignees

Labels

Networkaz network vnet/lb/nic/dns/etc...Service AttentionThis issue is responsible by Azure service team.act-quality-productivity-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions