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

Dnsdist check config #3412

Merged
merged 2 commits into from Feb 21, 2016
Merged

Conversation

pieterlexis
Copy link
Contributor

This allows testing of the configuration before one will try to restart
dnsdist with a broken config. Additionally, add tests to confirm the
config check still works.

This allows testing of the configuration before one will try to restart
dnsdist with a broken config. Additionally, add tests to confirm the
config check still works.
if (g_cmdLine.checkConfig) {
setupLua(true, g_cmdLine.config);
// No exception was thrown
infolog("Configuration '%s' OK!", g_cmdLine.config);
Copy link
Member

Choose a reason for hiding this comment

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

Just one thing, setupLua() outputs a warning but does not throw an exception if the configuration file does not exist. I believe that's fine, but that means we will gladly validate a non-existent file, which might not be what you had in mind.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

An empty config is a valid config was my reasoning :)

ahupowerdns added a commit that referenced this pull request Feb 21, 2016
@ahupowerdns ahupowerdns merged commit e09c0df into PowerDNS:master Feb 21, 2016
@pieterlexis pieterlexis deleted the dnsdist-check-config branch February 22, 2016 08:05
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.

None yet

4 participants