Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"az network dns zone import" fails with error 'list index out of range' #6602

Closed
stan-morisse opened this issue Jun 18, 2018 · 2 comments · Fixed by #6603
Closed

"az network dns zone import" fails with error 'list index out of range' #6602

stan-morisse opened this issue Jun 18, 2018 · 2 comments · Fixed by #6603
Assignees
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved.
Milestone

Comments

@stan-morisse
Copy link

Describe the bug
I exported multiple BIND files from an existing Linux server to import them in Azure DNS. I am trying to import the zones using Azure CLI 2.0. According to this document BIND files should be supported.
When executing the command "az network dns zone import -f "bind-file" -n "zone-name" -g resourcegroup-name", the command fails with the following error:

list index out of range
afbeelding

To Reproduce

  1. download the file attached.
    wpv.be.zone.txt
  2. change the working directory to the path where you downloaded the file in the previous step.
  3. run the command az network dns zone import -f 'wpv.be.zone.txt' -n 'wpv.be' -g net-DNS (, where 'net-Dns' is the name of our current resourcegroup)

Expected behavior
I expect the import to succeed as the file does not contain any keywords which are not supported.

Environment summary

azure-cli (2.0.37)

acr (2.0.26)
acs (2.1.0)
advisor (0.5.1)
ams (0.1.1)
appservice (0.1.34)
backup (1.1.1)
batch (3.2.3)
batchai (0.2.3)
billing (0.1.8)
cdn (0.0.14)
cloud (2.0.13)
cognitiveservices (0.1.13)
command-modules-nspkg (2.0.1)
configure (2.0.15)
consumption (0.3.1)
container (0.1.24)
core (2.0.37)
cosmosdb (0.1.21)
dla (0.1.0)
dls (0.0.21)
dms (0.0.1)
eventgrid (0.1.12)
eventhubs (0.1.3)
extension (0.0.14)
feedback (2.1.1)
find (0.2.9)
interactive (0.3.22)
iot (0.1.21)
keyvault (2.0.22)
lab (0.0.22)
maps (0.1.0)
monitor (0.1.7)
network (2.1.3)
nspkg (3.0.2)
policyinsights (0.1.0)
profile (2.0.25)
rdbms (0.2.3)
redis (0.2.13)
reservations (0.1.2)
resource (2.0.30)
role (2.0.24)
servicebus (0.1.2)
servicefabric (0.0.12)
sql (2.0.27)
storage (2.0.34)
vm (2.0.33)

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

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

Additional context
The files were retrieved from the Red Hat server, using the secure file copy tool pscp on a Windows 10 machine.

@tjprescott tjprescott added Network az network vnet/lb/nic/dns/etc... question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jun 18, 2018
@tjprescott tjprescott self-assigned this Jun 18, 2018
@tjprescott tjprescott added this to the Sprint 40 milestone Jun 18, 2018
@tjprescott tjprescott added bug This issue requires a change to an existing behavior in the product in order to be resolved. and removed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jun 18, 2018
@tjprescott
Copy link
Member

Hi @stan-morisse it looks like the command is not liking the $ttl 600 on line 2. If you remove it, it should import. We'll get the command fixed to support that syntax though. Thanks for the report and detailed repro.

@tjprescott
Copy link
Member

Upon further investigation, you only need to change $ttl 600 => $TTL 600. We'll fix the case sensitivity in the next release.

tjprescott added a commit that referenced this issue Jun 18, 2018
@haroldrandom haroldrandom added bug This issue requires a change to an existing behavior in the product in order to be resolved. Network-cli labels Oct 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants