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

Conversation

Projects
None yet
4 participants
@pieterlexis
Member

pieterlexis commented Feb 19, 2016

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.

pieterlexis added some commits Feb 19, 2016

dnsdist: add --check-config commandline switch
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.
@mind04

This comment has been minimized.

mind04 commented on docs/manpages/dnsdist.1.md in 5efcfa6 Feb 19, 2016

-c is --client

if (g_cmdLine.checkConfig) {
setupLua(true, g_cmdLine.config);
// No exception was thrown
infolog("Configuration '%s' OK!", g_cmdLine.config);

This comment has been minimized.

@rgacogne

rgacogne Feb 19, 2016

Member

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.

This comment has been minimized.

@pieterlexis

pieterlexis Feb 22, 2016

Member

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

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@pieterlexis pieterlexis deleted the pieterlexis:dnsdist-check-config branch Feb 22, 2016

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