-
Notifications
You must be signed in to change notification settings - Fork 3.4k
DNS zone import command has different behavior depending on the CLI version being used. #29375
Copy link
Copy link
Open
Labels
Auto-AssignAuto assign by botAuto assign by botAuto-ResolveAuto resolve by botAuto resolve by botNetwork - DNSaz network dnsaz network dnsPossible-SolutionService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.Similar-Issueact-quality-productivity-squadbugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.
Metadata
Metadata
Assignees
Labels
Auto-AssignAuto assign by botAuto assign by botAuto-ResolveAuto resolve by botAuto resolve by botNetwork - DNSaz network dnsaz network dnsPossible-SolutionService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.Similar-Issueact-quality-productivity-squadbugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.
Describe the bug
Hi Team,
We have a Azure DNS customer who is complaining that azcli feature has diverged between azcli versions 2.36.0, 2.60.0 and 2.61.0.
What is the observed result vs what is the expected? What is the specific deviation?
az network dns zone import -g -n -f
has different behavior depending on the CLI version being used.
Latest Az version 2.61.0 will provide error IF NS records are present in the file:
While older versions (2.36.0) would ignore the NS records and complete the import:
Our understand was that NS records will be ignored:
The name server record set at the zone apex is also created automatically by Azure DNS when the zone is created. Only the TTL of this record set is imported. These records contain the name server names provided by Azure DNS. The record data isn't overwritten by the values contained in the imported zone file.
Related command
az network dns zone import -g <resource group> -n <zone name> -f <zone file name>Errors
Issue script & Debug output
The error customer sees is getting thrown by this -
azure-cli/src/azure-cli/azure/cli/command_modules/network/custom.py
Line 2825 in a83263c
Expected behavior
With Az version 2.36.0, there is no issue with both zone file above we think it is right and wrong.
With Az version 2.60.0 and 2.61.0, we have issue with both zone file above and it always start with NS record. After remove NS, it's working.
Customers want to use the command below to import the DNS zone below.
Command: az network dns zone import -g -n -f
Zone file:
;c2.net.pl
c2.net.pl. 86400 IN SOA ns0.dnsmadeeasy.com. dns.dnsmadeeasy.com. 2008010120 43200 3600 1209600 180
c2.net.pl. 600 IN TXT "v=spf1 -all"
c2.net.pl. 600 IN TXT "MS=ms24745685"
c2.net.pl. 86400 IN NS ns0.dnsmadeeasy.com.
c2.net.pl. 86400 IN NS ns1.dnsmadeeasy.com.
c2.net.pl. 86400 IN NS ns2.dnsmadeeasy.com.
c2.net.pl. 86400 IN NS ns3.dnsmadeeasy.com.
c2.net.pl. 86400 IN NS ns4.dnsmadeeasy.com.
autodiscover.c2.net.pl. 3600 IN CNAME autodiscover.outlook.com.
=========================================================================
After discussed with TA, we think the right zone file should looks like below and this zone successfully import from Azure Portal.
;c2.net.pl
@ 86400 IN SOA ns0.dnsmadeeasy.com. dns.dnsmadeeasy.com. 2008010120 43200 3600 1209600 180
@ 600 IN TXT "v=spf1 -all"
@ 600 IN TXT "MS=ms24745685"
@ 86400 IN NS ns0.dnsmadeeasy.com.
@ 86400 IN NS ns1.dnsmadeeasy.com.
@ 86400 IN NS ns2.dnsmadeeasy.com.
@ 86400 IN NS ns3.dnsmadeeasy.com.
@ 86400 IN NS ns4.dnsmadeeasy.com.
autodiscover 3600 IN CNAME autodiscover.outlook.com.
Environment Summary
2.36.0
vs
2.60.0
vs
2.61.0
Additional context
No response