Add an option to turn off optimisation for rebuild_dnssync #411
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixes #410
This PR turns off optimisations for the
rebuild_dnssec
management command that save much time in the general case, but may lead to an incomplete rebuild if IP address filters for views are in place. This behavior has not been made the default because in many cases it won't be necessary and in the general case it saves a lot of time.The optimisation simply checks whether the IP address (address, DNS name and the DNSsync CFs) is still consistent with the address records associated with the address, and updating the records only if that's not the case. This does not take the case into account that the inconsistency is caused by a modified IP address filter, though, as checking that case on an individual base is expensive in terms of database operations.
By using the
--force
flag it's now possible to override the optimisation, which covers the case of modified or deleted IP address filters as well.