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
BIND: SOA number doesn't change if zone.js is required #2843
Comments
Hey there! Thanks for reporting this. When I try to reproduce this issue I see erratic behavior. Sometimes the serial resets to the I'll investigate further. |
Hey friend! I've tried to reproduce the bug with no success. Can you help me figure out what I'm doing differently?
|
Found the problem (at least for me). If any of the required files have SOA() in their domain configuration, all generated files (at least the ones following the require) have "1" as the serial. As said, this is for BIND. ==> example.com.zone.js <==
==> zones/example.com.zone <==
|
Ah! Thanks for doing that research. I won't have time to investigate right away (things are busy at work) but I will try to diagnose this late this week or early next week. |
@mraspor |
Sorry mate for the delay. Tried to install it right now, unfortunately it seems I am unable to install and test on a fresh Debian 12 following your instructions:
OK, here I edited go.mod and substituted 1.22.1 with 1.23. Now it started to download:
As you can see, it errors out on the last line, I'm not golang savvy, so have no idea what to do. Google wasn't my friend :( |
Ah go.mod... my arch nemesis! Can you try editing that to 1.22 (instead of 1.22.1) What's the output of "go version"? |
Changed as per your instruction to 1.22
And ran it again just now (same error):
Version is:
OS:
|
Ah, you're on go 1.19.8 and the code now requires 1.22.1. Can you upgrade Go on your machine? Otherwise let me know your email address and I can send you a binary. (You can securely send me messages via https://transfer.secretoverflow.com/u/tlimoncelli ) |
Ah, thank you @tlimoncelli . Go Version:
Adding example.com via required example.zone.js file, this is the file:
Generates a correct SOA number:
Adding additional A host (test) to example.zone.js
Generates correctly an updated SOA number:
So, thank you, you squashed a bug! :) |
Oh good! I'm glad its working for you. |
Describe the bug
If D() is in the main dnsconfig.js file, the SOA number for the BIND provider will get correctly created and updated (for example from 2024021800 to 2024021900).
If we require a file from the main dnsconfig.js
require("./example.com.zone.js");
the resulting .zone file will have its SOA number set to 1 and will not update.
To Reproduce
Steps to reproduce the behavior:
D('example.com', REG_NONE, DnsProvider(DSP_BIND), DefaultTTL('5m'), NAMESERVER_TTL('1h'), A('@', '10.10.10.10'), A('localhost', '127.0.0.1') );
require("./example.com.zone.js");
dnscontrol push
dnscontrol push
Expected behavior
SOA number should change
DNS Provider
The text was updated successfully, but these errors were encountered: