-
Notifications
You must be signed in to change notification settings - Fork 921
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[pdnsutil] Do not allow increase-serial on secondary zones #15133
base: master
Are you sure you want to change the base?
Conversation
we got a complaint about |
Why not. Let's make a list of the comamnds where it would apply, I can think of:
Maybe add-meta too? |
the meta stuff may be important for secondaries, like TSIG management, and for setups where a secondary receives a zone to then DNSSEC-sign it. (this means key management is also allowed) clear-zone is a fun one, perhaps it should be allowed. At least it won't cause desynced data, and it will eventually cause a new transfer. People sometimes do the equivalent in SQL. set-account seems harmless and perhaps useful. |
So the list would be:
|
I -think- in this flow, it is impossible to have getDomainInfo fail. So if it does, it exposes a bug or corruption, we can just abort. |
Well, until one week ago, the tinydns backend did not implement |
oh of course. I wonder if there are backends without getDomainInfo, that do allow mutations. So I think your approach is fine, or we can go for 'error' and eventually find out we were too strict :) |
Pull Request Test Coverage Report for Build 13203634449Details
💛 - Coveralls |
5503cc8
to
8067395
Compare
Indeed most of these operations can't run if |
The use of those commands on a secondary zone is limited, but certainly not zero. If we do this there should be an option to force the action, for those who know what they are doing. Rectify on a secondary zone is something that should be possible anyway (inline signing) |
be1bf8d
to
6d0f7f5
Compare
So there's a That ought to address all possible use cases... and give the users enough rope to shoot themselves in the feet. |
rectify-zone, rectify-all-zones and now secure-zone must be possible without the force option or you will break about 3/4 of all the inline sign scripts on the planet with this pull. The use of "non-primary" in the errors is confusing as it is excluding native zones. "secondary" will fit much better. |
6d0f7f5
to
443fefa
Compare
Only 3/4? I was aiming for more... How about this new flavour? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much better, two nits left.
This applies to: add-record, delete-rrset, edit-zone, increase-serial and replace-rrset. Fixes PowerDNS#11392, PowerDNS#15130
443fefa
to
47303db
Compare
Short description
As reported in #15130,
pdnsutil increase-serial
should fail on secondary zones.The approach in this PR is quite conservative, if the backend is not able to report whether the zone is primary or secondary, we'll try to increase anyway - have to trust the user at some point.
Similarly, there is no check added to
pdnsutil edit-zone
. We assume you know more or less what you are doing.Checklist
I have: