]> git.ipfire.org Git - thirdparty/knot-resolver.git/log
thirdparty/knot-resolver.git
7 years agosystemd: use persistent cache by default
Tomas Krizek [Thu, 11 Jan 2018 12:50:52 +0000 (13:50 +0100)] 
systemd: use persistent cache by default

The /run directory is non-persistent. Use /var/cache/knot-resolver
as a persistent cache.

7 years agoREADME: remove trailing whitespace
Tomas Krizek [Thu, 11 Jan 2018 12:55:08 +0000 (13:55 +0100)] 
README: remove trailing whitespace

7 years agoMerge branch 'clan-scan-build' into 'master'
Petr Špaček [Thu, 11 Jan 2018 17:48:53 +0000 (18:48 +0100)] 
Merge branch 'clan-scan-build' into 'master'

CI: add Clan scan build to pipeline

See merge request knot/knot-resolver!437

7 years agoCI: add Clang scan-build to the pipeline
Petr Špaček [Thu, 11 Jan 2018 17:12:30 +0000 (18:12 +0100)] 
CI: add Clang scan-build to the pipeline

For now error produced by scan-build are not fatal.
We need to fix these first.

7 years agoCI: use images from local registry
Petr Špaček [Thu, 11 Jan 2018 17:12:06 +0000 (18:12 +0100)] 
CI: use images from local registry

7 years agoMerge branch 'fix-systemd-service' into 'master'
Petr Špaček [Thu, 11 Jan 2018 07:07:21 +0000 (08:07 +0100)] 
Merge branch 'fix-systemd-service' into 'master'

systemd: drop WantedBy directive from kresd.service

See merge request knot/knot-resolver!433

7 years agosystemd: drop WantedBy directive from kresd.service
Daniel Kahn Gillmor [Tue, 9 Jan 2018 21:06:45 +0000 (16:06 -0500)] 
systemd: drop WantedBy directive from kresd.service

This directive is unnecessary in the .service file, and it also causes
a dependency cycle that systemd is obliged to break.

Since kresd is socket-activated, there is no need for the WantedBy
directive in the .service file itself.  As long as the .socket files
are installed, the service will run when it is used.

7 years agocache: nitpicks and comments
Vladimír Čunát [Wed, 10 Jan 2018 15:09:16 +0000 (16:09 +0100)] 
cache: nitpicks and comments

7 years agoMerge branch 'systemd-enable-manual-activation' into 'master'
Petr Špaček [Wed, 10 Jan 2018 14:46:26 +0000 (15:46 +0100)] 
Merge branch 'systemd-enable-manual-activation' into 'master'

systemd: enable manual activation of kresd.service as non-root user

See merge request knot/knot-resolver!434

7 years agosystemd: enable manual activation of kresd.service as non-root user
Tomas Krizek [Wed, 10 Jan 2018 13:05:53 +0000 (14:05 +0100)] 
systemd: enable manual activation of kresd.service as non-root user

To be able to bind to a well known port as a non-root user, the CAP_NET_BIND_SERVICE
capability is required.

7 years agoremoved lua-http installed through luarocks as it's installed in packages
Marek Vavruša [Tue, 9 Jan 2018 17:36:40 +0000 (09:36 -0800)] 
removed lua-http installed through luarocks as it's installed in packages

7 years agoRevert "add -Werror to daemon/lib to prevent builds with dead code"
Marek Vavruša [Tue, 9 Jan 2018 17:25:09 +0000 (09:25 -0800)] 
Revert "add -Werror to daemon/lib to prevent builds with dead code"

This reverts commit 9ca537e809a68984f1f4966e09ae3808a28b2f20.

7 years agoMerge !431: daemon: fix clang warnings
Vladimír Čunát [Tue, 9 Jan 2018 09:54:20 +0000 (10:54 +0100)] 
Merge !431: daemon: fix clang warnings

7 years agodaemon: fix clang warnings
Grigorii Demidov [Tue, 9 Jan 2018 09:35:26 +0000 (10:35 +0100)] 
daemon: fix clang warnings

7 years agoMerge remote-tracking branch 'origin/master' into query-trace
Marek Vavruša [Mon, 8 Jan 2018 21:32:21 +0000 (13:32 -0800)] 
Merge remote-tracking branch 'origin/master' into query-trace

7 years agoadd -Werror to daemon/lib to prevent builds with dead code
Marek Vavruša [Mon, 8 Jan 2018 19:53:08 +0000 (11:53 -0800)] 
add -Werror to daemon/lib to prevent builds with dead code

7 years agolib: added kr_rplan_last() function to get last processed query
Marek Vavruša [Fri, 29 Dec 2017 03:23:22 +0000 (19:23 -0800)] 
lib: added kr_rplan_last() function to get last processed query

The last processed query is not always resolved (if resolution fails),
so previous code returned wrong query in some messages after failure.

7 years agotests/config: all tests can now be asynchronous with worker.coroutine
Marek Vavruša [Fri, 29 Dec 2017 03:30:47 +0000 (19:30 -0800)] 
tests/config: all tests can now be asynchronous with worker.coroutine

7 years agodaemon: unified query completion callback with trace callback in resolve
Marek Vavruša [Fri, 29 Dec 2017 03:25:57 +0000 (19:25 -0800)] 
daemon: unified query completion callback with trace callback in resolve

This is a followup on addition of trace callbacks in the resolver library,
to get rid of the Lua/C interfacing in daemon and unify it with the log tracing.
All modules can now install completion callback on the kr_request object that
will be called after the resolution is done.

7 years agodaemon/worker: allow large responses for outbound over TCP
Marek Vavruša [Thu, 21 Dec 2017 06:22:36 +0000 (22:22 -0800)] 
daemon/worker: allow large responses for outbound over TCP

By default the reassembly packet buffer is set to EDNS buffer size,
which is correct for UDP, but not for TCP which may accept any
allowed response size. This should be only used for responses to
outbound queries over TCP, not for inbound TCP queries.

7 years agoImplement worker coroutines for asynchronous background processing
Marek Vavruša [Wed, 6 Dec 2017 00:52:40 +0000 (16:52 -0800)] 
Implement worker coroutines for asynchronous background processing

This implements worker coroutines in Lua to perform non-blocking I/O and do many things concurrently.
For example a file watcher can be now implemented as:

```
  local watcher = notify.opendir('/etc')
  watcher:add('hosts')

  -- Watch changes to /etc/hosts
  worker.coroutine(function ()
    for flags, name in watcher:changes() do
      for flag in notify.flags(flags) do
        print(name, notify[flag])
      end
    end
  end)
```

In order to make this work, the runtime uses the cqueues library which
can run coroutines concurrently, and return a file descriptor to poll on
if it's blocked. The worker takes that file descriptor and calls
`event.socket(pollfd, resume_callback)` so that libuv can wake up
the worker when its ready again.

The cqueues library is still optional, but if it's not present following stuff
won't work:

* worker.coroutine()
* worker.sleep()

7 years agocache get_lowest_rank: cleaner code
Vladimír Čunát [Mon, 8 Jan 2018 14:34:19 +0000 (15:34 +0100)] 
cache get_lowest_rank: cleaner code

7 years agoMerge branch 'sim_qry' into 'master'
Petr Špaček [Mon, 8 Jan 2018 11:40:07 +0000 (12:40 +0100)] 
Merge branch 'sim_qry' into 'master'

outbound TCP connections sharing; TLS over outbound TCP connections

Closes #104

See merge request knot/knot-resolver!379

7 years agodaemon: avoid memory leaks under heavy load when using tls over outgoing tcp connection
Grigorii Demidov [Mon, 8 Jan 2018 09:12:17 +0000 (10:12 +0100)] 
daemon: avoid memory leaks under heavy load when using tls over outgoing tcp connection

7 years agodaemon: kresd fall into endless loop in some circumstances when tls is used; fix
Grigorii Demidov [Fri, 5 Jan 2018 09:03:23 +0000 (10:03 +0100)] 
daemon: kresd fall into endless loop in some circumstances when tls is used; fix

7 years agodaemon/tls_ephemeral_credentials: avoid some memory leaks
Grigorii Demidov [Fri, 5 Jan 2018 07:15:39 +0000 (08:15 +0100)] 
daemon/tls_ephemeral_credentials: avoid some memory leaks

7 years agodaemon: explicit processing of UV_EOF within stream read callback function
grid [Wed, 3 Jan 2018 10:39:03 +0000 (11:39 +0100)] 
daemon: explicit processing of UV_EOF within stream read callback function

7 years agoTLS: only print [tls] messages if --verbose
Vladimír Čunát [Thu, 14 Dec 2017 12:24:35 +0000 (13:24 +0100)] 
TLS: only print [tls] messages if --verbose

7 years agomodules/policy: TLS defaults to port 853
Petr Špaček [Wed, 13 Dec 2017 16:05:33 +0000 (17:05 +0100)] 
modules/policy: TLS defaults to port 853

7 years agomodules/policy: local variable declarations were fixed; cleanup
grid [Wed, 13 Dec 2017 13:50:54 +0000 (14:50 +0100)] 
modules/policy: local variable declarations were fixed; cleanup

7 years agomodules/policy: local variable declarations were fixed
grid [Wed, 13 Dec 2017 13:46:43 +0000 (14:46 +0100)] 
modules/policy: local variable declarations were fixed

7 years agodaemon/tls: tls client bugfix; correct processing of tcp connection closure
grid [Wed, 13 Dec 2017 13:25:39 +0000 (14:25 +0100)] 
daemon/tls: tls client bugfix; correct processing of tcp connection closure

7 years agodaemon/tls: tls_push() can fall into endless loop in some circumstances; prevent it
grid [Wed, 13 Dec 2017 09:20:53 +0000 (10:20 +0100)] 
daemon/tls: tls_push() can fall into endless loop in some circumstances; prevent it

7 years agodaemon: outbound TLS: penalise NS if authentication fails
grid [Wed, 6 Dec 2017 10:45:43 +0000 (11:45 +0100)] 
daemon: outbound TLS: penalise NS if authentication fails

7 years agodaemon: cleanup - free the memory allocated for hostnames
grid [Wed, 6 Dec 2017 09:46:15 +0000 (10:46 +0100)] 
daemon: cleanup - free the memory allocated for hostnames

7 years agopolicy.TLS_FORWARD: reduce net.tls_client() calls
Vladimír Čunát [Tue, 5 Dec 2017 17:34:56 +0000 (18:34 +0100)] 
policy.TLS_FORWARD: reduce net.tls_client() calls

It should be enough to update the table once per TLS_FORWARD rule,
without re-doing that every time the policy is triggered.

7 years agoprint_tls_client_params: print all address#port pairs
Vladimír Čunát [Tue, 5 Dec 2017 17:02:57 +0000 (18:02 +0100)] 
print_tls_client_params: print all address#port pairs

nitpick: pre-allocate table sizes

7 years agodaemon: TLS over outbound TCP connection - use hostname authentication
grid [Tue, 5 Dec 2017 14:15:44 +0000 (15:15 +0100)] 
daemon: TLS over outbound TCP connection - use hostname authentication

7 years agodaemon: bugfixes
grid [Mon, 27 Nov 2017 23:04:32 +0000 (00:04 +0100)] 
daemon: bugfixes

7 years agodaemon: bugfix; resolver fails on assertion if TLS over outbound connection is used...
Grigorii Demidov [Fri, 24 Nov 2017 10:59:50 +0000 (11:59 +0100)] 
daemon: bugfix; resolver fails on assertion if TLS over outbound connection is used  and upstream closes connection after each query

7 years agodaemon: retry waiting tasks when outbound TCP connection has problems
Grigorii Demidov [Mon, 20 Nov 2017 19:26:23 +0000 (20:26 +0100)] 
daemon: retry waiting tasks when outbound TCP connection has problems

7 years agodaemon/worker: clear query TCP flags when retrying
Grigorii Demidov [Thu, 16 Nov 2017 13:28:16 +0000 (14:28 +0100)] 
daemon/worker: clear query TCP flags when retrying

7 years agodaemon/worker: bugfix, avoid access to deallocated task
Grigorii Demidov [Thu, 16 Nov 2017 12:10:31 +0000 (13:10 +0100)] 
daemon/worker: bugfix, avoid access to deallocated task

7 years agodaemon/worker: retry all waiting tasks if upstream drops TCP connection
Grigorii Demidov [Thu, 16 Nov 2017 11:27:46 +0000 (12:27 +0100)] 
daemon/worker: retry all waiting tasks if upstream drops TCP connection

7 years agodaemon/worker: don't SERVFAIL immediately when TCP connection to upstream fails
Grigorii Demidov [Thu, 16 Nov 2017 09:52:46 +0000 (10:52 +0100)] 
daemon/worker: don't SERVFAIL immediately when TCP connection to upstream fails

7 years agoCI: try increasing the number of allowed filedescriptors
Vladimír Čunát [Wed, 15 Nov 2017 10:30:03 +0000 (11:30 +0100)] 
CI: try increasing the number of allowed filedescriptors

(cherry picked from commit a4a6169c3cdf2293ea0637b9af4526fb2cbbb94d)
Testing what happens on our CI.

7 years agodaemon: TCP - for now session source address is queried at tcp_accept(). AF_UNSPEC...
Grigorii Demidov [Wed, 15 Nov 2017 09:56:09 +0000 (10:56 +0100)] 
daemon: TCP - for now session source address is queried at tcp_accept(). AF_UNSPEC is treated as error for both of udp&tcp.

7 years agodaemon: improved reliability under heavy load; bugfixing & minor refactoring
Grigorii Demidov [Tue, 14 Nov 2017 12:03:06 +0000 (13:03 +0100)] 
daemon: improved reliability under heavy load; bugfixing & minor refactoring

7 years agodaemon: reuse outbound TCP connections if possible; TLS over outbound TCP connection
Grigorii Demidov [Tue, 12 Sep 2017 11:52:10 +0000 (13:52 +0200)] 
daemon: reuse outbound TCP connections if possible; TLS over outbound TCP connection

7 years agoMerge branch 'master' into cache-aggr-wip
Vladimír Čunát [Thu, 4 Jan 2018 15:06:02 +0000 (16:06 +0100)] 
Merge branch 'master' into cache-aggr-wip

7 years agounit tests: disable cache tests, at least for now
Vladimír Čunát [Thu, 4 Jan 2018 14:57:27 +0000 (15:57 +0100)] 
unit tests: disable cache tests, at least for now

The cache API has changed, and it's in the process of being removed,
with cache getting more contained in a layer-module.

7 years agoNSEC3 packet cache (non-aggressive): fix the rank + optout
Vladimír Čunát [Thu, 4 Jan 2018 13:59:19 +0000 (14:59 +0100)] 
NSEC3 packet cache (non-aggressive): fix the rank + optout

7 years agoMerge !430: Travis fixes and dependency updates
Vladimír Čunát [Thu, 4 Jan 2018 13:39:53 +0000 (14:39 +0100)] 
Merge !430: Travis fixes and dependency updates

7 years agotravis: skip Deckard tests
Vladimír Čunát [Thu, 4 Jan 2018 13:26:32 +0000 (14:26 +0100)] 
travis: skip Deckard tests

7 years agotravis: try to fix python modules
Vladimír Čunát [Thu, 4 Jan 2018 10:45:38 +0000 (11:45 +0100)] 
travis: try to fix python modules

7 years agobootstrap-depends: update dependencies
Vladimír Čunát [Thu, 4 Jan 2018 10:35:34 +0000 (11:35 +0100)] 
bootstrap-depends: update dependencies

7 years agoMerge branch 'travis_fixes' into 'master'
Petr Špaček [Thu, 4 Jan 2018 13:16:30 +0000 (14:16 +0100)] 
Merge branch 'travis_fixes' into 'master'

Do not point to Travis from README

See merge request knot/knot-resolver!429

7 years agoREADME: use badges from Gitlab instead of Travis/Coveralls
Petr Špaček [Thu, 4 Jan 2018 13:09:28 +0000 (14:09 +0100)] 
README: use badges from Gitlab instead of Travis/Coveralls

7 years agoMakefile: suppress misleadning warning about missing coverage.stats dir
Petr Špaček [Thu, 4 Jan 2018 10:45:32 +0000 (11:45 +0100)] 
Makefile: suppress misleadning warning about missing coverage.stats dir

7 years agoMakefile: remove unused check-config-clean
Petr Špaček [Thu, 4 Jan 2018 10:45:05 +0000 (11:45 +0100)] 
Makefile: remove unused check-config-clean

7 years agoMerge branch 'vendemiat/extend_kres_lua' into 'master'
Petr Špaček [Thu, 4 Jan 2018 10:19:55 +0000 (11:19 +0100)] 
Merge branch 'vendemiat/extend_kres_lua' into 'master'

Add useful lua functions to handle knot types

See merge request knot/knot-resolver!425

7 years agoallow access to cache object through context
Marek Vavruša [Thu, 4 Jan 2018 00:07:35 +0000 (16:07 -0800)] 
allow access to cache object through context

this surfaces the struct kr_cache through context variable,
it doesn't implement any API or documented interface for it,
so I just added a tests for the struct presence and introspection

7 years agoadded basic tests for cache interface
Marek Vavruša [Wed, 3 Jan 2018 23:24:23 +0000 (15:24 -0800)] 
added basic tests for cache interface

7 years agorenamed pkt:clear() to pkt:recycle() and added tests
Marek Vavruša [Wed, 3 Jan 2018 20:00:49 +0000 (12:00 -0800)] 
renamed pkt:clear() to pkt:recycle() and added tests

7 years agosupport text conversion of unknown RR types
Marek Vavruša [Tue, 2 Jan 2018 23:03:22 +0000 (15:03 -0800)] 
support text conversion of unknown RR types

7 years agoadded more functions to packet, added tests
Marek Vavruša [Fri, 29 Dec 2017 21:01:56 +0000 (13:01 -0800)] 
added more functions to packet, added tests

7 years agoadd useful lua functions to handle knot types
Vicky Shrestha [Thu, 21 Dec 2017 06:07:02 +0000 (22:07 -0800)] 
add useful lua functions to handle knot types

7 years agoMerge branch 'vendemiat/track_qsize' into 'master'
Petr Špaček [Thu, 4 Jan 2018 09:40:46 +0000 (10:40 +0100)] 
Merge branch 'vendemiat/track_qsize' into 'master'

daemon: add query packet size to kr_request

See merge request knot/knot-resolver!424

7 years agoAdd query packet size to kr_request
Vicky Shrestha [Sat, 16 Dec 2017 04:37:15 +0000 (20:37 -0800)] 
Add query packet size to kr_request

This is useful when we do logging from the finish layer

7 years agoMerge branch 'publish_master_coverage' into 'master'
Petr Špaček [Wed, 3 Jan 2018 17:21:48 +0000 (18:21 +0100)] 
Merge branch 'publish_master_coverage' into 'master'

CI: publish coverage only for master branch (on web)

See merge request knot/knot-resolver!426

7 years agoCI: publish coverage only for master branch (on web)
Petr Špaček [Wed, 3 Jan 2018 16:56:39 +0000 (17:56 +0100)] 
CI: publish coverage only for master branch (on web)

Non-master branches must not overwrite results from master branch.
From now only master branch publishes results on Gitlab Pages.
Results for other branches can be downloaded from artifacts.

7 years agoentry_h_consistent: split for NSEC-chain entries
Vladimír Čunát [Wed, 3 Jan 2018 15:02:24 +0000 (16:02 +0100)] 
entry_h_consistent: split for NSEC-chain entries

NSEC type can occur for normal (exact-hit) entries, e.g. as negative
packet from explicit NSEC query from user in unsigned zone.

7 years agocache pkt stashing: relax an assertion
Vladimír Čunát [Wed, 3 Jan 2018 10:32:02 +0000 (11:32 +0100)] 
cache pkt stashing: relax an assertion

7 years agofixup merge fallout (monotonic timestamps)
Vladimír Čunát [Wed, 3 Jan 2018 09:44:00 +0000 (10:44 +0100)] 
fixup merge fallout (monotonic timestamps)

`qry->creation_time` -> `qry->timestamp`

7 years agoMerge tag 'v1.5.1' into cache-aggr-wip
Vladimír Čunát [Wed, 3 Jan 2018 09:25:09 +0000 (10:25 +0100)] 
Merge tag 'v1.5.1' into cache-aggr-wip

7 years agoclear cache if overfull
Vladimír Čunát [Wed, 3 Jan 2018 08:57:27 +0000 (09:57 +0100)] 
clear cache if overfull

I somehow forgot to migrate that behavior when rewriting cache :-/

7 years agokr_ranked_rrarray_add: relax assertion
Vladimír Čunát [Tue, 2 Jan 2018 19:01:21 +0000 (20:01 +0100)] 
kr_ranked_rrarray_add: relax assertion

... after my changes to fetch_glue.  It really seems safe.

7 years agolmdb: drop assertions on MDB_BAD_TXN
Vladimír Čunát [Tue, 2 Jan 2018 14:47:10 +0000 (15:47 +0100)] 
lmdb: drop assertions on MDB_BAD_TXN

lmdb errors are really driving me crazy

7 years agoMerge branch 'build-coverage-artifacts' into 'master'
Petr Špaček [Sun, 24 Dec 2017 00:37:14 +0000 (01:37 +0100)] 
Merge branch 'build-coverage-artifacts' into 'master'

CI coverage: build coverage report

See merge request knot/knot-resolver!407

7 years agofixup! build: added `make coverage` to compute C and Lua code coverage
Petr Špaček [Sat, 23 Dec 2017 22:47:24 +0000 (23:47 +0100)] 
fixup! build: added `make coverage` to compute C and Lua code coverage

Test coverage results for Lua code were off-by-one line.

7 years agoCI coverage: parallelize Lua code coverage processing
Petr Špaček [Sat, 23 Dec 2017 19:32:24 +0000 (20:32 +0100)] 
CI coverage: parallelize Lua code coverage processing

Execution of scripts/luacov_to_info.lua can take quite a long time so it
is now done in paralell.

Beware: This needs proper depedencies on coverage-lua-fix-paths target
and so on to avoid race conditions.

7 years agoCI coverage: merge test coverage data from parallel runs
Petr Špaček [Fri, 22 Dec 2017 12:21:24 +0000 (13:21 +0100)] 
CI coverage: merge test coverage data from parallel runs

We run tests in paralell so have to make sure that coverage tools
do not overwrite results from each run.

This is hacky because lcov tool insists on having gcno and gcda files
in the same place as original source, so we have to copy files
to workaround this.

7 years agodaemon: gather luacov statistics from early start
Petr Špaček [Thu, 21 Dec 2017 15:42:20 +0000 (16:42 +0100)] 
daemon: gather luacov statistics from early start

If KRESD_COVERAGE_STATS environment variable is set, luacov statistics
are saved to path specified by it.

Beware! Parallel execution needs special handling which is not built-in.

7 years agoCI coverage: add missing Lua files to the report
Petr Špaček [Thu, 21 Dec 2017 09:09:11 +0000 (10:09 +0100)] 
CI coverage: add missing Lua files to the report

Luacov does not know about files which were not loaded at all.
Script luacov_gen_empty.sh generates empty luacov stats for all files
which forces luacov to show all files.

7 years agoCI coverage: handle Lua code coverage properly
Petr Špaček [Wed, 20 Dec 2017 11:47:10 +0000 (12:47 +0100)] 
CI coverage: handle Lua code coverage properly

Luacov statistics contained paths to installed files instead of source
files that it was a mess. The stats are now rewritten using hacky
mapping (created from install commands produced by make).

Also, branch and function coverage for Lua was always zero so now it is
turned off not to confuse users.

kresd config for respdiff now enables luacov as well.

7 years agofix gitignore
Marek Vavruša [Wed, 29 Nov 2017 21:58:26 +0000 (13:58 -0800)] 
fix gitignore

7 years agoCI coverage: build coverage report and publish to pages
Marek Vavruša [Wed, 29 Nov 2017 21:24:55 +0000 (13:24 -0800)] 
CI coverage: build coverage report and publish to pages

Beware: this version does not handle parallel execution

7 years agoRevert "kres: added support for NULL type"
Marek Vavruša [Thu, 21 Dec 2017 06:43:53 +0000 (22:43 -0800)] 
Revert "kres: added support for NULL type"

This reverts commit 0a891eb671538708bf489b603ddf71cb12a061f4.

7 years agofixup after rebase from master
Marek Vavruša [Thu, 21 Dec 2017 06:34:24 +0000 (22:34 -0800)] 
fixup after rebase from master

7 years agomodules/http: added selected records to /trace endpoint
Marek Vavruša [Thu, 30 Nov 2017 00:16:08 +0000 (16:16 -0800)] 
modules/http: added selected records to /trace endpoint

This allows debugging of what records were used for final answer.

7 years agokres: added support for NULL type
Marek Vavruša [Thu, 30 Nov 2017 00:12:45 +0000 (16:12 -0800)] 
kres: added support for NULL type

7 years agomain: close loop after it's finished to please valgrind
Marek Vavruša [Tue, 28 Nov 2017 17:50:15 +0000 (09:50 -0800)] 
main: close loop after it's finished to please valgrind

also disabled priming and TA signalisation during tests

7 years agoci: added lua-http dependency to build, fixed test for http
Marek Vavruša [Tue, 28 Nov 2017 17:28:39 +0000 (09:28 -0800)] 
ci: added lua-http dependency to build, fixed test for http

7 years agoclean up on module test success, fix priming query failing predict test
Marek Vavruša [Tue, 28 Nov 2017 16:55:18 +0000 (08:55 -0800)] 
clean up on module test success, fix priming query failing predict test

7 years agomodules/http: updated format of the /trace log
Marek Vavruša [Tue, 28 Nov 2017 16:34:23 +0000 (08:34 -0800)] 
modules/http: updated format of the /trace log

7 years agomodules/http: added /trace endpoint for request log tracing, added tests
Marek Vavruša [Tue, 28 Nov 2017 00:42:08 +0000 (16:42 -0800)] 
modules/http: added /trace endpoint for request log tracing, added tests

This leverages the HTTP interface to trace execution of individual
requests. This is helpful for troubleshooting problems with a specific instance,
or to generate test files (as it writes out answers received).

Ideally it would also print a timeline of request processing broken down by
function (or layer) and the amount of time spent, but there's no
tracepoint for that yet.

7 years agolib: added support for trace_log for verbose messages
Marek Vavruša [Mon, 27 Nov 2017 23:02:35 +0000 (15:02 -0800)] 
lib: added support for trace_log for verbose messages

The `QRVERBOSE` macro uses the `query` pointer to find out whether the
request has trace log enabled. If it does, it uses trace log to log verbose messages using that callback (regardless of whether verbose mode is set or not).

This required changing of structure printing functions to formatting functions returning textual representation of the objects (dname, rrset, pkt).
This is potentially slower as creates heap objects, but it doesn't happen
in the hotpath so it doesn't really matter for verbose logs.

7 years agolib/rplan: remember request context in each query
Marek Vavruša [Mon, 27 Nov 2017 22:59:55 +0000 (14:59 -0800)] 
lib/rplan: remember request context in each query

This doesn't affect any of the objects lifetime, just provides a
convenience for logging as some subsystems take only pointer of queries
not the request object.

7 years agolib/resolve: add support for per-request logging
Marek Vavruša [Mon, 27 Nov 2017 22:19:10 +0000 (14:19 -0800)] 
lib/resolve: add support for per-request logging

This is useful in many troubleshooting scenarios when you want debug logs
just for a single request. It's going to expand on TRACE flag functionality
in the next PRs, so that special requests can be invoked with various tracers attached.

Currently this is only available in the C modules that can set the callback,
it's not called anywhere in the library yet.

7 years agodaemon: fixed memory leaking from wrk_resolve on some input errors
Marek Vavruša [Mon, 27 Nov 2017 22:10:19 +0000 (14:10 -0800)] 
daemon: fixed memory leaking from wrk_resolve on some input errors