-
Notifications
You must be signed in to change notification settings - Fork 401
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
Preview of records if zone doesn't exist yet #3007
Comments
Hi there! I'm having difficulty reproducing this. Can you send me sample output? Also, please include the output of Thanks! |
Would you please try again with the (ppreview is the future replacement for preview. it is a rewrite from scratch with many new features) |
CC @das7pad |
On the phone, I can check in detail when I'm back late next week. @Koopzington can you try again with the latest version of dnscontrol and a different, random domain name? |
I just tested this with the BIND provider and I get a full preview. I wanted to verify that this isn't a global problem. I look forward to @Koopzington 's results. I'm optimistic. |
I can reproduce the report with a random domain. It looks like something is not quite right in dnscontrol. var REG_NONE = NewRegistrar('none')
var DSP_HETZNER = NewDnsProvider('HETZNER')
D('testing-2024-12-27.dev', REG_NONE, DnsProvider(DSP_HETZNER),
A('@', '127.0.0.1')
) HEAD (6d5bfe9)
With extra logging: diff --git a/providers/hetzner/hetznerProvider.go b/providers/hetzner/hetznerProvider.go
index 414b2ecf..832bd351 100644
--- a/providers/hetzner/hetznerProvider.go
+++ b/providers/hetzner/hetznerProvider.go
@@ -59,2 +59,3 @@ func New(settings map[string]string, _ json.RawMessage) (providers.DNSServicePro
func (api *hetznerProvider) EnsureZoneExists(domain string) error {
+ fmt.Println("\nHETZNER -> EnsureZoneExists", domain)
domains, err := api.ListZones()
@@ -70,2 +71,3 @@ func (api *hetznerProvider) EnsureZoneExists(domain string) error {
+ fmt.Println("\nHETZNER -> EnsureZoneExists", domain, "createZone")
if err = api.createZone(domain); err != nil {
@@ -145,2 +147,3 @@ func (api *hetznerProvider) GetZoneRecordsCorrections(dc *models.DomainConfig, e
func (api *hetznerProvider) GetNameservers(domain string) ([]*models.Nameserver, error) {
+ fmt.Println("\nHETZNER -> GetNameservers", domain)
z, err := api.getZone(domain)
@@ -155,2 +158,3 @@ func (api *hetznerProvider) GetNameservers(domain string) ([]*models.Nameserver,
func (api *hetznerProvider) GetZoneRecords(domain string, meta map[string]string) (models.Records, error) {
+ fmt.Println("\nHETZNER -> GetZoneRecords", domain)
records, err := api.getAllRecords(domain)
@@ -171,2 +175,3 @@ func (api *hetznerProvider) GetZoneRecords(domain string, meta map[string]string
func (api *hetznerProvider) ListZones() ([]string, error) {
+ fmt.Println("\nHETZNER -> ListZones")
zones, err := api.getAllZones()
Here is roughly what's happening: The main routine runs on the zone via
TL;DR: On a glance, this seems to be affecting all providers that need to "create" a resource before they can list zone records or discover nameservers. This looks like a bug in dnscontrol. To be able to list nameservers and zone records, Proposed fix: I think it would be sensible to change the order of operations in Auto-creating zones on preview could be a follow-up change (i.e. run |
Could we make
preview
display the records that would be created even if the zone doesn't exist yet?Right now (at least for the Hetzner DNS Provider if that's relevant) i only get to see the created records when i
push
and let dnscontrol automatically create the zone. It would be nice if we could review them in thepreview
output first though.The text was updated successfully, but these errors were encountered: