SLOG(g_log << Logger::Warning << "Unable to open configuration file '" << configname << "'" << endl,
startupLog->error("No such file", "Unable to open configuration file", "config_file", Logging::Loggable(configname)));
}
+ else {
+ if (!::arg().mustDo("enable-old-settings")) {
+ startupLog->info(Logr::Error, "Old-style settings syntax not enabled by default anymore. Use YAML or enable with --enable-old-settings on the command line", "configname", Logging::Loggable(configname));
+ return EXIT_FAILURE;
+ }
+ }
}
// Reparse, now with config file as well, both for old-style as for YAML settings
''',
'versionadded': '4.5.0'
},
+ {
+ 'name' : 'enable_old_settings',
+ 'section' : 'recursor',
+ 'type' : LType.Bool,
+ 'default' : 'false',
+ 'help' : 'Enable (deprecated) parsing of old-style settings',
+ 'doc' : '''
+Enable the deprecated parsing of old-style settings.
+Only makes sense to set on the command line.
+ ''',
+ 'skip-yaml': True,
+ 'versionadded': '5.2.0',
+ },
{
'name' : 'entropy_source',
'section' : 'recursor',
recursorcmd = [os.environ['PDNSRECURSOR'],
'--config-dir=%s' % confdir,
'--local-port=%s' % port,
- '--security-poll-suffix=']
+ '--security-poll-suffix=',
+ '--enable-old-settings']
print(' '.join(recursorcmd))
logFile = os.path.join(confdir, 'recursor.log')
PREFIX=10.0.3
# PDNSRECURSOR= # set to override default location
-# PDNS= # set to override default location
+# PDNS= # set to override default location
AUTHRUN="exec authbind ${PDNS} --config-dir=. > logfile 2>&1"
-RECRUN="exec authbind ${PDNSRECURSOR} --config-dir=. --daemon=no --trace=yes --dont-query= --local-address=$PREFIX.9 --hint-file=hintfile --packetcache-ttl=0 --max-cache-ttl=15 --threads=1 > logfile 2>&1"
+RECRUN="exec authbind ${PDNSRECURSOR} --config-dir=. --daemon=no --trace=yes --dont-query= --local-address=$PREFIX.9 --hint-file=hintfile --packetcache-ttl=0 --max-cache-ttl=15 --threads=1 --enable-old-settings > logfile 2>&1"
<measurement><name>system CPU seconds</name><value>%S</value></measurement>
<measurement><name>wallclock seconds</name><value>%e</value></measurement>
<measurement><name>%% CPU used</name><value>%P</value></measurement>
-' ${RECURSOR} --daemon=no --local-port=$port --socket-dir=./ --trace=$TRACE --config-dir=. --max-mthreads=$mthreads --query-local-address="0.0.0.0${QLA6}" --threads=$threads --record-cache-shards=$shards --refresh-on-ttl-perc=10 --dnssec=validate --pdns-distributes-queries --reuseport=no > recursor.log 2>&1 &
+' ${RECURSOR} --daemon=no --local-port=$port --socket-dir=./ --trace=$TRACE --config-dir=. --max-mthreads=$mthreads --query-local-address="0.0.0.0${QLA6}" --threads=$threads --record-cache-shards=$shards --refresh-on-ttl-perc=10 --dnssec=validate --pdns-distributes-queries --reuseport=no --enable-old-settings > recursor.log 2>&1 &
sleep 3
if [ ! -e pdns_recursor.pid ]; then
cat recursor.log