You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is not a support question, I have read about opensource and will send support questions to the IRC channel, GitHub Discussions or the mailing list.
While working on adding the "does the key really exist" checks adedd to pdnsutil add-zone-key to the similar import-zone-key and import-zone-key-pem, some tests started to fail due to this check.
It turns out that, on a bind + sql configuration, where the bind zones do not have any keys, adding (or importing) a zone key fails at the sql level, because the domain does not exist in the database.
This turns out to be a can of worms larger than expected, so I'm opening an issue to keep track of this until I can find a proper way to solve the problem (issueing pdns create-zone won't work as the zones are existing in the bind configuration which takes precedence).
Environment
Does not matter
Steps to reproduce
cd regression-tests.auth-py
Run one of the tests which uses bind + sql, e.g. ./runtests test_XFRIncomplete.py
Run ../pdns/pdnsutil --config-dir=configs/auth list-all-zones to confirm example.org exists
Run ../pdns/pdnsutil --config-dir=configs/auth list-keys example.org to confirm no key exists
Run ../pdns/pdnsutil --config-dir=configs/auth import-zone-key example.org configs/auth/dnssec.key, it outputs 0 which is not a valid key id.
Run ../pdns/pdnsutil --config-dir=configs/auth list-keys example.org to confirm no key exists.
Expected behaviour
The key is correctly inserted into the database, with a non-zero key id.
Actual behaviour
SQL INSERT request fails because the zone does not exist in the database. Because of this, the select LAST_INSERT_ID() request returns a value of 0 (no insertion took place), which is not handled as an error.
The text was updated successfully, but these errors were encountered:
This is not a support question, I have read about opensource and will send support questions to the IRC channel, GitHub Discussions or the mailing list.
I have read and understood the 'out in the open' support policy
Program: pdnsutil (authoritative)
Issue type: Bug report
Short description
While working on adding the "does the key really exist" checks adedd to
pdnsutil add-zone-key
to the similarimport-zone-key
andimport-zone-key-pem
, some tests started to fail due to this check.It turns out that, on a bind + sql configuration, where the bind zones do not have any keys, adding (or importing) a zone key fails at the sql level, because the domain does not exist in the database.
This turns out to be a can of worms larger than expected, so I'm opening an issue to keep track of this until I can find a proper way to solve the problem (issueing
pdns create-zone
won't work as the zones are existing in the bind configuration which takes precedence).Environment
Does not matter
Steps to reproduce
cd regression-tests.auth-py
./runtests test_XFRIncomplete.py
../pdns/pdnsutil --config-dir=configs/auth list-all-zones
to confirmexample.org
exists../pdns/pdnsutil --config-dir=configs/auth list-keys example.org
to confirm no key exists../pdns/pdnsutil --config-dir=configs/auth import-zone-key example.org configs/auth/dnssec.key
, it outputs 0 which is not a valid key id.../pdns/pdnsutil --config-dir=configs/auth list-keys example.org
to confirm no key exists.Expected behaviour
The key is correctly inserted into the database, with a non-zero key id.
Actual behaviour
SQL
INSERT
request fails because the zone does not exist in the database. Because of this, theselect LAST_INSERT_ID()
request returns a value of 0 (no insertion took place), which is not handled as an error.The text was updated successfully, but these errors were encountered: