azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

Azure DNS zone import fails on records which share a type name

Open nkindberg opened this issue 8 years ago • 1 comments

Describe the bug Zone import fails for Azure DNS if the name of the record conflicts with a record type name.

To Reproduce Importing the below zone file repros the issue where the name of the record (ns) conflicts with NS record type name and causes a parsing error.

$TTL 300
$ORIGIN nicknstest.com.
    
@ 3600 IN SOA ns1-03.azure-dns.com. azuredns-hostmaster.microsoft.com. (
              1 ; serial
              3600 ; refresh
              300 ; retry
              2419200 ; expire
              300 ; minimum
              )
 
  172800 IN NS ns1-03.azure-dns.com.
  172800 IN NS ns2-03.azure-dns.net.
  172800 IN NS ns3-03.azure-dns.org.
  172800 IN NS ns4-03.azure-dns.info.
;
ns 3600 IN A 1.2.3.4
az network dns zone import -f E:\temp\nstest.dns -n nicknstest.com -g nicktest
Unable to parse: ns 3600 A 1.2.3.4

Expected behavior The record should have been successfully parsed/imported as an A record with name ns and value 1.2.3.4.

Environment summary Install Method (e.g. pip, interactive script, apt-get, Docker, MSI, edge build) / CLI version (az --version) / OS version / Shell Type (e.g. bash, cmd.exe, Bash on Windows)

az --version
azure-cli (2.0.45)

acr (2.1.4)
acs (2.3.2)
advisor (0.6.0)
ams (0.2.3)
appservice (0.2.3)
backup (1.2.1)
batch (3.3.3)
batchai (0.4.2)
billing (0.2.0)
botservice (0.1.0)
cdn (0.1.1)
cloud (2.1.0)
cognitiveservices (0.2.1)
command-modules-nspkg (2.0.2)
configure (2.0.18)
consumption (0.4.0)
container (0.3.3)
core (2.0.45)
cosmosdb (0.2.1)
dla (0.2.2)
dls (0.1.1)
dms (0.1.0)
eventgrid (0.2.0)
eventhubs (0.2.3)
extension (0.2.1)
feedback (2.1.4)
find (0.2.12)
interactive (0.3.28)
iot (0.3.1)
iotcentral (0.1.1)
keyvault (2.2.2)
lab (0.1.1)
maps (0.3.2)
monitor (0.2.3)
network (2.2.4)
nspkg (3.0.3)
policyinsights (0.1.0)
profile (2.1.1)
rdbms (0.3.1)
redis (0.3.2)
relay (0.1.1)
reservations (0.3.2)
resource (2.1.3)
role (2.1.4)
search (0.1.1)
servicebus (0.2.2)
servicefabric (0.1.2)
sql (2.1.3)
storage (2.2.1)
telemetry (1.0.0)
vm (2.2.2)

Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\nikindb\.azure\cliextensions'

Python (Windows) 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 16:07:46) [MSC v.1900 32 bit (Intel)]`

nkindberg avatar Aug 30 '18 00:08 nkindberg

Tagging @tjprescott for review/triage. We received a customer support case on this and I validated repro. Let me know if you need any info/help from Azure DNS team.

nkindberg avatar Aug 30 '18 00:08 nkindberg