Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUNNY_DNS: Error After Zone Creation (The Bunny is Too Fast) #2961

Open
Silvenga opened this issue May 16, 2024 · 1 comment
Open

BUNNY_DNS: Error After Zone Creation (The Bunny is Too Fast) #2961

Silvenga opened this issue May 16, 2024 · 1 comment

Comments

@Silvenga
Copy link

Silvenga commented May 16, 2024

Describe the bug

There appears to be a race condition in the Bunny DNS provider when a given zone needs to be created. From my testing, it looks like the following is happening:

  • Zone detected as absent.
  • Zone created, Bunny returns OK.
  • NS's need to be queried for this newly created zone.
  • An exception is thrown, as this zone does not exist (likely eventually consistent?).

To Reproduce

Steps to reproduce the behavior:

  1. Configure the Bunny DNS (bunny_dns) provider.
  2. Create a zone that does not exist in the Bunny account.
  3. Observe that sometimes zone creation succeeds, but sometimes fails when querying for this zone again (in the same push operation). When a failure occurs, immediately attempting to push, succeeds.
#1: Create zone '<domain>' in the 'bunny_dns' profile
WARNING: BUNNY_DNS: Added zone <domain> with ID 206015SUCCESS!
INFO#1: Domain "<domain>" provider bunny_dns Error: "<domain>" is not a zone in this BUNNY_DNS account
INFO#1: DtermineNS: zone "<domain>"; Error: error while getting Nameservers for zone="<domain>" with provider="bunny_dns": "<domain>" is not a zone in this BUNNY_DNS account
Done. 1 corrections.

Expected behavior

Ideally, the provider should verify existence here and retry in the case the zone doesn't exist, likely with some pause.

func (b *bunnydnsProvider) EnsureZoneExists(domain string) error {
_, err := b.findZoneByDomain(domain)
if err == nil {
return nil
}
zone, err := b.createZone(domain)
if err != nil {
return err
}
printer.Warnf("BUNNY_DNS: Added zone %s with ID %d", domain, zone.ID)
return nil
}

DNS Provider

  • Bunny DNS

Additional context

🐰

@tlimoncelli
Copy link
Contributor

CC @ppmathis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants