AKAMAIEDGEDNS: Fix AKAMAICDN add/modify. Fix integrationTest.#2722
Merged
Conversation
Contributor
|
Thanks! Akamai users will be very happy! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A fix for "AKAMAIEDGEDNS: AKAMAICDN records unable to be added/modified #2680"
BEFORE THE FIX:
% cat dnsconfig.js
var REG_NONE = NewRegistrar("none");
var DSP_AKAMAIEDGEDNS = NewDnsProvider("akamaiedgedns");
D("svernick-new.com", REG_NONE, DnsProvider(DSP_AKAMAIEDGEDNS),
NAMESERVER_TTL(86400),
AKAMAICDN('sjvtest-a','jlarocca.pmdemo.com.edgesuite.net',TTL(20)),
AKAMAICDN('sjvtest-b','jlarocca.pmdemo.com.edgesuite.net.',TTL(20))
);
% ~/go/bin/dnscontrol push --full
******************** Domain: svernick-new.com
----- Getting nameservers from: akamaiedgedns
----- DNS Provider: akamaiedgedns...
2 corrections (akamaiedgedns)
#1: + CREATE AKAMAICDN sjvtest-a.svernick-new.com jlarocca.pmdemo.com.edgesuite.net.svernick-new.com. ttl=20
FAILURE! recordset creation failed. error: Invalid Operation: [hostname 'jlarocca.pmdemo.com.edgesuite.net.svernick-new.com.' is not allowed for AKAMAICDN]
#2: + CREATE AKAMAICDN sjvtest-b.svernick-new.com jlarocca.pmdemo.com.edgesuite.net. ttl=20
FAILURE! recordset creation failed. error: Invalid Operation: [hostname 'jlarocca.pmdemo.com.edgesuite.net.' is not allowed for AKAMAICDN]
----- Registrar: none...
0 corrections (none)
Done. 2 corrections.
completed with errors
Integration tests fail:
go test -v -verbose -timeout 15m -provider AKAMAIEDGEDNS
FAIL
exit status 1
FAIL github.com/StackExchange/dnscontrol/v4/integrationTest 450.017s
AFTER THE FIX:
% cat dnsconfig.js
var REG_NONE = NewRegistrar("none");
var DSP_AKAMAIEDGEDNS = NewDnsProvider("akamaiedgedns");
D("svernick-new.com", REG_NONE, DnsProvider(DSP_AKAMAIEDGEDNS),
NAMESERVER_TTL(86400),
AKAMAICDN('sjvtest-a','jlarocca.pmdemo.com.edgesuite.net',TTL(20)),
AKAMAICDN('sjvtest-b','jlarocca.pmdemo.com.edgesuite.net.',TTL(20))
);
% ~/go/bin/dnscontrol push --full
******************** Domain: svernick-new.com
----- Getting nameservers from: akamaiedgedns
----- DNS Provider: akamaiedgedns...
2 corrections (akamaiedgedns)
#1: + CREATE AKAMAICDN sjvtest-a.svernick-new.com jlarocca.pmdemo.com.edgesuite.net ttl=20
SUCCESS!
#2: + CREATE AKAMAICDN sjvtest-b.svernick-new.com jlarocca.pmdemo.com.edgesuite.net. ttl=20
FAILURE! recordset creation failed. error: Invalid Operation: [hostname 'jlarocca.pmdemo.com.edgesuite.net.' is not allowed for AKAMAICDN]
----- Registrar: none...
0 corrections (none)
Done. 2 corrections.
completed with errors
The FAILURE! for 2 here is expected, as the record data is an edge hostname (edge hostnames are not allowed to end in a . )
Integration tests pass:
% go test -v -verbose -timeout 15m -provider AKAMAIEDGEDNS
PASS
ok github.com/StackExchange/dnscontrol/v4/integrationTest 477.520s