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
dnsdist returns 0 as result for a config check of an non-existing file.
I understand that an empty or nonexistent config file is syntactically valid for DNSDIST, but this is still a little bit surprising.
My expectation was that explicitly checking a file which cannot be read would result in a non-zero return code.
Operating system: CentOS
Software version: dnsdist 1.3.3
Software source: PowerDNS repository
Steps to reproduce
dnsdist --check --config nonexistentfile; echo $?
Expected behaviour
Expectation: non-zero return code (because of "unable to read configuration from 'nonexistentfile').
Actual behaviour
$ dnsdist --check --config nonexistentfile; echo $?
Unable to read configuration from 'nonexistentfile'
Configuration 'nonexistentfile' OK!
0
Note the ZERO returncode.
The text was updated successfully, but these errors were encountered:
Thank you for reporting this!
This is easy enough to fix (preliminary work in https://github.com/rgacogne/pdns/tree/dnsdist-check-config) but since we use --check-config in our systemd unit file, among other places, I wonder if that might break some setups where the default configuration file does not exist.
Short description
dnsdist returns 0 as result for a config check of an non-existing file.
I understand that an empty or nonexistent config file is syntactically valid for DNSDIST, but this is still a little bit surprising.
My expectation was that explicitly checking a file which cannot be read would result in a non-zero return code.
Steps to reproduce
dnsdist --check --config nonexistentfile; echo $?
Expected behaviour
Expectation: non-zero return code (because of "unable to read configuration from 'nonexistentfile').
Actual behaviour
Note the ZERO returncode.
The text was updated successfully, but these errors were encountered: