dnscontrol: BUG: ROUTE53: diff2 crashes when trying to IGNORE_NAME/IGNORE_TARGET with R53_ALIAS

Error with the new diff2 production test

./.tools/dnscontrol version
dnscontrol  (bcf590f649ac94b03ea994ff9b5d76cc921c7f89) built 16 Apr 23 21:19 CEST
./.tools/dnscontrol preview --diff2=true
[INFO: Diff2 algorithm in use.]
******************** Domain: customer.com
2023/04/17 16:04:34 record.go:366: No such DNS type as ("R53_ALIAS")
make: *** [preview] Error 1

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 39 (22 by maintainers)

Most upvoted comments

P.S. I didn’t get a lot of sleep last night. Please verify that I understood your comment correctly.

Ah, yes, this is something that will be fixed before diff2 becomes the default.

diff1 doesn’t report what got ignored. I don’t plan on fixing this.

diff2 reports the “INFO” changes as “changes”, which means the count is off. My plan is to fix this before diff2 becomes the default. See https://github.com/StackExchange/dnscontrol/issues/2300

Thanks for the update! I think we’re getting closer.

If I may restate the problem…

I think the bug is that a line like:

IGNORE_TARGET('**.acm-validations.aws.', 'CNAME'),

Is not ignoring DNS records like:

- DELETE _REDACTED.domain.co.uk CNAME _REDACTED.REDACTED.acm-validations.aws. ttl=60
- DELETE _REDACTED.domain.co.uk CNAME _REDACTED.REDACTED.acm-validations.aws. ttl=60

Can you tell me anything about those two CNAMEs? Is there anything special about them?

Do they get ignored if you change the ** to * ? (I’m wondering if this is a wildcard processing issue)

@JBOClara:

Here’s my theory: The old code stores R53_ALIAS records as a CNAME or A record with a flag that means “well, it’s not really a CNAME… its an Amazon alias for a CNAME” (or A record). The new code stores R53_ALIAS records as an R53_ALIAS with a flag that indicates if this aliasing a CNAME or an A record. The IGNORE code is a bit confused.

We can test this by adding this code to your D():

    IGNORE_TARGET('**.acm-validations.aws.', 'R53_ALIAS'),

If that works for both with and without diff2, then we know that’s the problem.

Try moving the --diff2 to just after dnscontrol.