mirror of
https://github.com/PowerDNS-Admin/PowerDNS-Admin.git
synced 2026-04-25 08:45:55 +03:00
[GH-ISSUE #5] Can't enter multiple NS records #5
Labels
No labels
bug / broken-feature
bug / broken-feature
docs / request
feature / request
help / other
mod / help-wanted
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/PowerDNS-Admin-PowerDNS-Admin#5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ghost on GitHub (Jan 15, 2016).
Original GitHub issue: https://github.com/PowerDNS-Admin/PowerDNS-Admin/issues/5
If I add a second NS entry for the zone it removes the first one
@ivanfilippov commented on GitHub (Feb 8, 2016):
This also affects MX records.
@ivanfilippov commented on GitHub (Feb 9, 2016):
Looks like the PDNS API expects same-type records to be updated as a single 'rrset' in the JSON request (using multiple 'records') instead of over multiple 'rrsets'. This issue will prevent the creation of any records (after the first one) that share a name and type, this includes NS, MX, SRV and TXT entries as well as multiple A and AAAA entries used for round-robin style DNS.
This is what the PDNS API expects:
And this is what the PowerDNS-Admin code sends:
The code needing the fix is in 'app/models.py'.
@ivanfilippov commented on GitHub (Feb 11, 2016):
I'm not a Python wizard by any means, but I've created a pull request with my solution to this problem. Anyone else wanting to fix the issue before the pull request is accepted can make the code modification listed in the pull request (https://github.com/ngoduykhanh/PowerDNS-Admin/pull/7).
@ngoduykhanh commented on GitHub (Feb 11, 2016):
Thanks @mortzu for raising this issue and @ivanfilippov for the pull request. I've tried the code in your pull request, it seems not working in all case yet. There was a case that I lose all duplicate records.
I also pushed a new change for fixing this bug, see commit
c94e24c985@ivanfilippov commented on GitHub (Feb 11, 2016):
Your changes worked on my side, thanks @ngoduykhanh !
@kushalkumar101 commented on GitHub (Jul 25, 2016):
I have added two MX records, If I try to add third MX record it will replace older records.
@jon617 commented on GitHub (Jan 17, 2017):
I cannot get three MX records to add. Only the last one is stored.
Only the last one is stored.
UPDATE I figured it out. Documentation was not that helpful in figuring this out, but I guessed to add all MX records in a single rrset element, and it worked:
I assume the changetype "REPLACE" keys off of the "name" and "type" as its key. So if the name and type are the same (like multiple MX records, or I assume A and AAAA records too), put all under the single "records" array.
Most domains do have multiple MX records, and your documentation does not have any examples of this. You are welcome to add my above example MX record for your documentation.