1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

Fix for incomplete results from Azure DNS in fetchRecordSets (#791)

This commit is contained in:
Sump Runlet
2020-07-28 20:35:56 +03:00
committed by GitHub
parent ea328263c7
commit 42f7568074

View File

@@ -518,15 +518,18 @@ func (a *azureDNSProvider) fetchRecordSets(zoneName string) ([]*adns.RecordSet,
var records []*adns.RecordSet
ctx, cancel := context.WithTimeout(context.Background(), 6000*time.Second)
defer cancel()
recordsIterator, recordsErr := a.recordsClient.ListAllByDNSZoneComplete(ctx, *a.resourceGroup, zoneName, to.Int32Ptr(1000), "")
recordsIterator, recordsErr := a.recordsClient.ListAllByDNSZone(ctx, *a.resourceGroup, zoneName, to.Int32Ptr(1000), "")
if recordsErr != nil {
return nil, recordsErr
}
recordsResult := recordsIterator.Response()
for _, r := range *recordsResult.Value {
record := r
records = append(records, &record)
for recordsIterator.NotDone() {
recordsResult := recordsIterator.Response()
for _, r := range *recordsResult.Value {
record := r
records = append(records, &record)
}
recordsIterator.NextWithContext(ctx)
}
return records, nil