pdns
pdns copied to clipboard
Atomic replacement of zone contents using the API
- Program: Authoritative
- Issue type: Feature request
Short description
In the current functionality of the API of PowerDNS, it seems only possible to modify the contents of a zone by deleting or replacing RRSets in the zone. This way of editing a zone requires knowledge about the current state of the zone in PowerDNS, so a modification in the zone would always require two consecutive requests to the API. Please add functionality to replace the contents of a zone in a single, atomic request to the API. The functionality would be similar to 'load-zone' of pdnsutil.
Usecase
The most important value this feature would add for us, is that a complete zone change could be done in one atomic request. This minimizes the chance of race conditions and it emulates the behaviour of a database transaction in which an update is performed.
Description
I'm requesting the addition of a new endpoint to the API of PowerDNS, at which a complete zone with records and comments can be pushed in JSON format. The endpoint should then clear the current zone contents and replace the contents with the new zone contents (preferably in one database transaction). In case of a validation error or any other error, the zone modifications should be rolled back to the original state and the (validation) errors should be returned in the response. Changes in zone metadata are beyond the scope of this issue, it only focuses on changes in RRsets, Records and Comments.
Would suggest doing this within the existing PUT code; but refactoring all the rrset update code to be reusable might be ... annoying :)
Any updates on this ?
Any updates on this ?
No, sorry. Plenty of people that want this but none that have decided to type it in so far (which I get, it's quite a task).
wait for updating
For future ref and SEO foo magic: We'd like the equivalent of pdnsutil load-zone
via the API
I think this can closed, now with #12086 beeing merged.