From 6e20d2a42313d0fd09ac6bf16e65a15b3d191052 Mon Sep 17 00:00:00 2001 From: bert hubert Date: Tue, 22 Mar 2016 08:54:43 +0100 Subject: [PATCH] warn if recursor or pdns can't be found in regression tests (but continue anyhow), improve documentation, remove "you can safely ignore this error"-error which still confused me, document lua-posix dependency, document how authbind works --- regression-tests.recursor/README.md | 13 +++++++------ regression-tests.recursor/config.sh | 27 +++++++++++++++++++++------ regression-tests.recursor/vars.sample | 2 ++ 3 files changed, 30 insertions(+), 12 deletions(-) diff --git a/regression-tests.recursor/README.md b/regression-tests.recursor/README.md index 91bbe1a2c3..edcaa0c30c 100644 --- a/regression-tests.recursor/README.md +++ b/regression-tests.recursor/README.md @@ -16,9 +16,12 @@ The suite also requires `bind()` access to port 53. The example config relies on authbind for this: $ ls -al /etc/authbind/byport/53 - -rwxr-xr-x 1 root root 0 May 31 2012 /etc/authbind/byport/53 + -rwxr-xr-x 1 you you 0 May 31 2012 /etc/authbind/byport/53 -Other dependencies: daemontools. +Note that this file needs to be executable by the user you run as for +authbind to work! + +Other dependencies: daemontools, lua-posix SETTING UP ---------- @@ -27,7 +30,7 @@ Copy `vars.sample` to `vars` $ cp vars.sample vars -Edit `vars`. +Edit `vars`: The /24 to bind the various daemons in: @@ -39,7 +42,7 @@ How to run the auth server (usually no need to change this): How to run the recursor (usually, again, no need to change this): - RECRUN="exec authbind ../../../pdns/pdns_recursor --config-dir=. --socket-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 ../../../pdns/recursordist/pdns_recursor --config-dir=. --socket-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" RUNNING @@ -63,11 +66,9 @@ Check that they are all up: ... configs/10.0.3.8: up (pid 1138) 13 seconds configs/recursor-service: up (pid 1140) 13 seconds - configs/run-auth: unable to chdir: not a directory (They all need to be up more than a few seconds, otherwise they might be crashing on startup. Check the per-service `logfile` if something is wrong). -The `run- auth` error is normal. Run the tests: diff --git a/regression-tests.recursor/config.sh b/regression-tests.recursor/config.sh index b7b8cb1b26..a3ffc930a5 100755 --- a/regression-tests.recursor/config.sh +++ b/regression-tests.recursor/config.sh @@ -21,10 +21,8 @@ then exit 1 fi - rm -rf configs/ mkdir configs -cd configs cat > run-auth < recursor-service/run < run < recursor-service/hintfile << EOF +cat > hintfile << EOF . 3600 IN NS ns.root. ns.root. 3600 IN A $PREFIX.8 EOF +cd .. + SOA="ns.example.net. hostmaster.example.net. 1 3600 1800 1209600 300" ### fake root zone @@ -453,7 +468,7 @@ zone "$realzone"{ }; EOF done - ln -s ../run-auth $dir/run + ln -s ../../run-auth $dir/run done cat > recursor-service/forward-zones-file << EOF diff --git a/regression-tests.recursor/vars.sample b/regression-tests.recursor/vars.sample index d78f6d87b2..8de2909b47 100644 --- a/regression-tests.recursor/vars.sample +++ b/regression-tests.recursor/vars.sample @@ -1,3 +1,5 @@ PREFIX=10.0.3 +# PDNSRECURSOR= # 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=. --socket-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" -- 2.47.2