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

Add support for reloading configuration on SIGHUP #373

Merged
merged 4 commits into from
Aug 15, 2024

Conversation

k0ekk0ek
Copy link
Contributor

@k0ekk0ek k0ekk0ek commented Aug 9, 2024

Fixes #323.

@orlitzky
Copy link
Contributor

orlitzky commented Aug 9, 2024

Thanks for this! Since SIGHUP/reload are mentioned in https://github.com/NLnetLabs/nsd/blob/master/doc/README#L607, it might help to compare the two? If I understand correctly, nsd-control reload always reloads everything, but SIGHUP only reloads the zones unless the new option is enabled.

For that matter, it might also make sense to mention the new option in https://github.com/NLnetLabs/nsd/blob/master/nsd.8.in#L209?

Copy link
Member

@wcawijngaards wcawijngaards left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, the option could also be coded in config_print_zone() in nsd-checkconf.c:285, and config_test_print_server() in nsd-checkconf.c:605 and then see if tpkg/checkconf.tdir needs changes too. Nice to have backwards compatible behaviour with the new option to also read in new zones, drop old zones, and change tsig keys, from the config file.

@k0ekk0ek
Copy link
Contributor Author

Thanks @wcawijngaards. Forgot about checkconf. I'll add it (and the manpage updates suggested by @orlitzky).

@k0ekk0ek
Copy link
Contributor Author

@orlitzky

If I understand correctly, nsd-control reload always reloads everything, but SIGHUP only reloads the zones unless the new option is enabled.

No, I hooked up the new option to logic that was already implemented for nsd-control reconfig. Updated the man page.

@k0ekk0ek k0ekk0ek merged commit 5255d04 into NLnetLabs:master Aug 15, 2024
3 checks passed
@k0ekk0ek k0ekk0ek deleted the add-zones-on-sighup branch August 15, 2024 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add zones without nsd-control
3 participants