-
-
Notifications
You must be signed in to change notification settings - Fork 208
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
Duplicate local DNS entries on 2nd import of pre-v6 export #2257
Comments
Okay, so the bug path is a v5 Teleporter image imported on v6 does not wipe out the
fixes this for you. |
Ok, I attempted to test this and it didn't work. Then, I actually read the output of the "checkout" command and noticed:
I don't see anything in the available list that looks like what you requested (assuming a possible typo). So, not sure what happened. |
Now that I'm back from my morning appointment, I did a little more research here. I noticed that this fix had been merged into development and the patch was deleted. So, I took a chance (on my test VM) and did a checkout of the "development" branch and retested. And this did fix my issue. Thanks for all your effort. |
Versions
Platform
Expected behavior
DNS server to not "fail"
Actual behavior / bug
A clear and concise description of what the bug is.
"DNS SERVER FAILURE" with PIHOLE.LOG (as reported in web interface):
2025-02-22 15:56:38.316 duplicate CNAME at line 123 of /etc/pihole/dnsmasq.conf
2025-02-22 15:56:38.316 FAILED to start up
Reviewing "pihole.toml" both the "hosts" and "cnameRecords" arrays show the newest entries appended to existing entries. A comma is added to the last existing entry so the array is syntactically correct.
Steps to reproduce
Have an existing pre-v6 PiHole server with several local DNS and CNAME records.
On pre-v6 PiHole, use Teleporter page to export existing configuration.
Spin up a new v6 PiHole server. Either bare metal or docker (I've tested both).
On new v6 PiHole use Teleporter page to import the pre-v6 configuration.
On pre-v6 PiHole, change a local DNS entry (either record or CNAME). Not necessary, but it was my use case.
On pre-v6 PiHole, use Teleporter page to export the updated configuration.
On v6 PiHole use Teleporter page to import the updated configuration.
See error reported upon completion of import.
pihole.log page shows above "FAILED to start up" message
Local DNS records (under "settings") show duplicates in both DNS Records and CNAME records
These duplicates are also found in the "pihole.toml" file
Debug Token
Screenshots
Additional context
Duplicate DNS Records can be deleted on the web page. However, attempting to delete duplicate CNAME records results in " Invalid configuration - dnsmasq: duplicate CNAME at line 122 of /etc/pihole/dnsmasq.conf.temp: " message. These must be deleted from underlying "pihole.toml" file.
A valid backup exported from the v6-PiHole teleporter page can be imported multiple times and will not cause duplicate entries. So, this bug is somewhere in the translation logic.
The text was updated successfully, but these errors were encountered: