StackExchange / dnscontrol

Infrastructure as code for DNS!
https://dnscontrol.org/
MIT License
3.11k stars 396 forks source link

Misleading Error Message when Route53 DelegationSet is full, and a new domain is added #2962

Open hallorans-nca opened 5 months ago

hallorans-nca commented 5 months ago

Describe the bug If a Route53 DelegationSet is full, and another domain tries to be added, the error message you receive does not return the root cause of the error

To Reproduce Steps to reproduce the behavior:

  1. Create DelegationSet, and populate with 100 domains (The default limit, but this can be increased)
  2. Run dnscontrol preview
  3. Confirm the message about 'will be added automatically' is present
  4. Run dnscontrol push
  5. See Error about 'error while getting Nameservers'

Preview

ROUTE53 DelegationSet N.....M configured
******************** Domain: zzzdnscontroldebug.com.au
WARNING: Zone 'zzzdnscontroldebug.com.au' does not exist in the 'r53...n...m' profile and will be added automatically.
WARNING: No nameservers declared; skipping registrar. Add {no_ns:'true'} to force.
Done. 0 corrections.

Push

ROUTE53 DelegationSet N.....M configured
******************** Domain: zzzdnscontroldebug.com.au
Adding zone for zzzdnscontroldebug.com.au to route 53 account with delegationSet N.....M
ERROR: ERROR: error while getting Nameservers for zone="zzzdnscontroldebug.com.au" with provider="r53...n...m": 
Domain zzzdnscontroldebug.com.au not found in your route 53 account
Done. 0 corrections.

Expected behavior The error returned should include that the DelegationSet 'N.....M' is full, and some suggested actions

DNS Provider Route53

Additional context Maybe when the DelegationSet is probed, the current number of domains, and the domain limit should also be retrieved. Using that information, plus the number of new domains for the DelegationSet could make DNSControl fail early.

tlimoncelli commented 4 months ago

CC @tresni