Skip to content

Conversation

@huws
Copy link
Contributor

@huws huws commented Mar 21, 2022

Description
This is necessary to allow hyphenated SRV records targets to be successfully imported. Today, such imports fail, as described in #21716

Testing Guide
Without the fix, importing this valid zone file (db.example.com) will fail:

@                 3600 IN SOA  ns admin ( 2014010800 ; Serial
                                          3600       ; Refresh
                                          3600       ; Retry
                                          3600       ; Expire
                                          300 )      ; Minimum TTL

_sip._tcp.pool 300 IN SRV 20 10 5060 valid-target-1
_sip._tcp.pool 300 IN SRV 20 10 5060 valid-target-2
_sip._tcp.pool 300 IN SRV 20 10 5060 valid-target-3

Failure output from import using az network private-dns zone import --resource-group <RG NAME> --name example.com --file-name db.example.com:

== BEGINNING ZONE IMPORT: example.com ==
	
	(1/4) Imported 1 records of type 'soa' and name '@'
	(BadRequest) The list of record sets of type 'SRV' may not contain multiple entries with the same '(priority, weight, target)'.
	Code: BadRequest
	Message: The list of record sets of type 'SRV' may not contain multiple entries with the same '(priority, weight, target)'.
	
	== 1/4 RECORDS IMPORTED SUCCESSFULLY: 'example.com' ==

With the fix, this import succeeds with the output:

	== BEGINNING ZONE IMPORT: example.com ==
	
	(1/4) Imported 1 records of type 'soa' and name '@'
	(4/4) Imported 3 records of type 'srv' and name '_sip._tcp.pool'
	
	== 4/4 RECORDS IMPORTED SUCCESSFULLY: 'example.com' ==

History Notes


This checklist is used to make sure that common guidelines for a pull request are followed.

@ghost ghost requested a review from yonzhan March 21, 2022 10:26
@ghost ghost added the Auto-Assign Auto assign by bot label Mar 21, 2022
@ghost ghost requested a review from necusjz March 21, 2022 10:26
@ghost ghost assigned kairu-ms Mar 21, 2022
@ghost ghost added this to the Mar 2022 (2022-04-06) milestone Mar 21, 2022
@ghost ghost added the Network az network vnet/lb/nic/dns/etc... label Mar 21, 2022
@yonzhan
Copy link
Collaborator

yonzhan commented Mar 21, 2022

Network

@kairu-ms kairu-ms assigned necusjz and unassigned kairu-ms Mar 21, 2022
@necusjz
Copy link
Member

necusjz commented Mar 22, 2022

@huws Overall LGTM, but please refine the PR title and rebase with the latest changes from dev branch.

@huws huws changed the title [Network] Fix #21716: az network private-dns zone import fails for hyphenated SRV records [Network] Fix #21716: az network private-dns zone import fails for hyphenated SRV records Mar 22, 2022
@huws huws changed the title [Network] Fix #21716: az network private-dns zone import fails for hyphenated SRV records [Network] Fix #21716: az network private-dns zone import: Allow hyphenated SRV records Mar 22, 2022
Copy link
Member

@necusjz necusjz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@huws, I was aware that this PR introduced too many others' commits, i.e., too many unrelated file changes. So, please make it clean and only introduce related changes. Thanks.

@huws huws force-pushed the srv-record-hyphens branch from e040309 to d7ecadf Compare March 28, 2022 14:04
@huws
Copy link
Contributor Author

huws commented Mar 28, 2022

Apologies - not sure what happened, there. The PR is now clean - just my one commit.

@necusjz
Copy link
Member

necusjz commented Mar 28, 2022

@huws never mind, our CI was also down at that moment.

@necusjz
Copy link
Member

necusjz commented Mar 29, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@necusjz necusjz merged commit 24b38c9 into Azure:dev Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Auto-Assign Auto assign by bot Network az network vnet/lb/nic/dns/etc...

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants