Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pdnsutil add-zone-key: more checks #15025

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

miodvallat
Copy link
Contributor

Short description

Old issues #1304 and #2855 describe situations where pdnsutil add-zone-key failed yet did not report failure.

I believe the current state of the code will correctly report failure, but it does not hurt to be more careful in pdnsutil. The changes in this PR achieve two things:

  • pdnsutil add-zone-key will exit with non-zero status if attempting to get the key ID from the backend failed (for we can not be sure a key had been added in this case).
  • if the backend is able to return a key ID, an extra request to fetch the key with this ID will be performed, to confirm the key has correctly be created; if this fetch fails, it will report the error and exit with a non-zero status code.

The first two commits are purely janitorial cleanup; the important change is found in the third commit. Commit-by-commit review recommended.

Checklist

I have:

  • read the CONTRIBUTING.md document
  • compiled this code
  • tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression test(s)
  • added or modified unit test(s)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant