]> git.ipfire.org Git - thirdparty/knot-resolver.git/log
thirdparty/knot-resolver.git
4 years agodoh2: send "cache-control: max-age"
Lukáš Ježek [Mon, 9 Nov 2020 07:52:37 +0000 (08:52 +0100)] 
doh2: send "cache-control: max-age"

4 years agoMerge branch 'github-actions' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1269 obs-knot-resolver-es11k1/deployments/1268
Petr Špaček [Wed, 25 Nov 2020 17:48:58 +0000 (18:48 +0100)] 
Merge branch 'github-actions' into 'master'

ci: move macOS build to GitHub Actions

See merge request knot/knot-resolver!1099

4 years agoci: so long, Travis!
Tomas Krizek [Wed, 25 Nov 2020 12:25:02 +0000 (13:25 +0100)] 
ci: so long, Travis!

https://blog.travis-ci.com/2020-11-02-travis-ci-new-billing

4 years agoci: use GitHub Actions for mac testing
Tomas Krizek [Wed, 25 Nov 2020 12:24:44 +0000 (13:24 +0100)] 
ci: use GitHub Actions for mac testing

4 years agogithub: run macOS build
Tomas Krizek [Wed, 25 Nov 2020 10:18:44 +0000 (11:18 +0100)] 
github: run macOS build

4 years agoMerge branch 'map-doc' into 'master'
Petr Špaček [Wed, 25 Nov 2020 17:19:51 +0000 (18:19 +0100)] 
Merge branch 'map-doc' into 'master'

doc: map() and certificate reload

See merge request knot/knot-resolver!1098

4 years agodoc: mention DoT/DoH blogpost 72642
Tomas Krizek [Wed, 25 Nov 2020 13:13:03 +0000 (14:13 +0100)] 
doc: mention DoT/DoH blogpost

4 years agodoc: add certificate reload tip to net.tls()
Tomas Krizek [Tue, 24 Nov 2020 17:31:33 +0000 (18:31 +0100)] 
doc: add certificate reload tip to net.tls()

4 years agodoc: describe map() usage with examples
Tomas Krizek [Tue, 24 Nov 2020 17:31:05 +0000 (18:31 +0100)] 
doc: describe map() usage with examples

4 years agoMerge branch 'xdp-emulation' into 'master'
Petr Špaček [Wed, 25 Nov 2020 13:57:27 +0000 (14:57 +0100)] 
Merge branch 'xdp-emulation' into 'master'

xdp: warn when using XDP emulation

See merge request knot/knot-resolver!1092

4 years agoxdp: warn when using XDP emulation
Vladimír Čunát [Thu, 12 Nov 2020 13:13:49 +0000 (14:13 +0100)] 
xdp: warn when using XDP emulation

For simplicity we bump Knot version that's required for using XDP.
Syntax: I found no better way to split the line;
alternative: backslash in meson >= 0.50.

4 years agoMerge branch 'meson-join-paths' into 'master'
Petr Špaček [Wed, 25 Nov 2020 10:23:07 +0000 (11:23 +0100)] 
Merge branch 'meson-join-paths' into 'master'

meson: use / instead of join_paths

See merge request knot/knot-resolver!1086

4 years agomeson: use / instead of join_paths
Tomas Krizek [Fri, 16 Oct 2020 09:04:28 +0000 (11:04 +0200)] 
meson: use / instead of join_paths

4 years agoMerge branch 'pgp-keyring' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1257 obs-knot-dns-deve-jq0xxt/deployments/1258 obs-knot-dns-deve-jq0xxt/deployments/1261 obs-knot-dns-deve-jq0xxt/deployments/1262 obs-knot-dns-deve-jq0xxt/deployments/1265 obs-knot-dns-deve-jq0xxt/deployments/1267 obs-knot-resolver-es11k1/deployments/1256 obs-knot-resolver-es11k1/deployments/1259 obs-knot-resolver-es11k1/deployments/1260 obs-knot-resolver-es11k1/deployments/1263 obs-knot-resolver-es11k1/deployments/1264 obs-knot-resolver-es11k1/deployments/1266
Tomas Krizek [Thu, 19 Nov 2020 09:38:18 +0000 (10:38 +0100)] 
Merge branch 'pgp-keyring' into 'master'

generate PGP keyring

See merge request knot/knot-resolver!1096

4 years agoadd security.txt
Tomas Krizek [Wed, 18 Nov 2020 11:44:45 +0000 (12:44 +0100)] 
add security.txt

4 years agoscrips: generate kresd PGP keyblock
Tomas Krizek [Wed, 18 Nov 2020 11:33:40 +0000 (12:33 +0100)] 
scrips: generate kresd PGP keyblock

4 years agoMerge branch 'map-32bit' into 'master'
Tomas Krizek [Wed, 18 Nov 2020 16:14:36 +0000 (17:14 +0100)] 
Merge branch 'map-32bit' into 'master'

fix map() command on 32-bit platforms; regressed in 5.2.0

See merge request knot/knot-resolver!1093

4 years agofix map() command on 32-bit platforms; regressed in 5.2.0
Vladimír Čunát [Fri, 13 Nov 2020 13:16:32 +0000 (14:16 +0100)] 
fix map() command on 32-bit platforms; regressed in 5.2.0

LuaJIT FFI was using opendir() (etc.) variants with 32-bit inodes
but the C parts was using them as 64-bit inode variants.
Consequently the `struct dirent` layout didn't match and we were getting
filenames shifted by eight bytes.

Now the whole dir-listing lua function is written in C.

4 years agoMerge branch 'test-krprint-valgrind' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1245 obs-knot-dns-deve-jq0xxt/deployments/1246 obs-knot-dns-deve-jq0xxt/deployments/1249 obs-knot-dns-deve-jq0xxt/deployments/1250 obs-knot-dns-deve-jq0xxt/deployments/1252 obs-knot-resolver-es11k1/deployments/1244 obs-knot-resolver-es11k1/deployments/1247 obs-knot-resolver-es11k1/deployments/1248 obs-knot-resolver-es11k1/deployments/1251 obs-knot-resolver-es11k1/deployments/1253
Petr Špaček [Fri, 13 Nov 2020 16:35:59 +0000 (17:35 +0100)] 
Merge branch 'test-krprint-valgrind' into 'master'

tests/krprint: reduce test complexity (for valgrind CI)

See merge request knot/knot-resolver!1094

4 years agotests/krprint: reduce test complexity (for valgrind CI)
Tomas Krizek [Fri, 13 Nov 2020 15:19:32 +0000 (16:19 +0100)] 
tests/krprint: reduce test complexity (for valgrind CI)

4 years agoMerge branch 'ci-news' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1240 obs-knot-dns-deve-jq0xxt/deployments/1242 obs-knot-resolver-es11k1/deployments/1241 obs-knot-resolver-es11k1/deployments/1243
Petr Špaček [Wed, 11 Nov 2020 17:36:12 +0000 (18:36 +0100)] 
Merge branch 'ci-news' into 'master'

ci: ensure NEWS has current date

See merge request knot/knot-resolver!1091

4 years agoci: ensure NEWS has current date
Tomas Krizek [Wed, 11 Nov 2020 17:21:07 +0000 (18:21 +0100)] 
ci: ensure NEWS has current date

4 years agoMerge branch 'release-5-2-0' into 'master' obs-knot-resolver-8xyvhu/deployments/1239 obs-knot-resolver-kv62s6/deployments/1238 v5.2.0
Tomas Krizek [Wed, 11 Nov 2020 12:22:20 +0000 (13:22 +0100)] 
Merge branch 'release-5-2-0' into 'master'

Release 5.2.0

See merge request knot/knot-resolver!1090

4 years agorelease 5.2.0
Tomas Krizek [Wed, 11 Nov 2020 10:19:56 +0000 (11:19 +0100)] 
release 5.2.0

4 years agoupdate AUTHORS
Tomas Krizek [Wed, 11 Nov 2020 10:44:45 +0000 (11:44 +0100)] 
update AUTHORS

4 years agodoc: update upgrading guide
Tomas Krizek [Wed, 11 Nov 2020 09:56:41 +0000 (10:56 +0100)] 
doc: update upgrading guide

4 years agoetc/config: add doh2 examples
Tomas Krizek [Wed, 11 Nov 2020 09:54:01 +0000 (10:54 +0100)] 
etc/config: add doh2 examples

4 years agoMerge branch 'perf-af_xdp' into 'master'
Tomas Krizek [Wed, 11 Nov 2020 09:48:33 +0000 (10:48 +0100)] 
Merge branch 'perf-af_xdp' into 'master'

server-side XDP support

Closes #533

See merge request knot/knot-resolver!1083

4 years agodoc: add warning that XDP is experimental
Tomas Krizek [Wed, 11 Nov 2020 09:44:26 +0000 (10:44 +0100)] 
doc: add warning that XDP is experimental

4 years agodoc: mention possible issues with XDP emulation
Tomas Krizek [Wed, 11 Nov 2020 09:27:43 +0000 (10:27 +0100)] 
doc: mention possible issues with XDP emulation

4 years agodaemon/io refactor: don't expose unused io_deinit() obs-knot-resolver-bs4hbr/deployments/1235
Vladimír Čunát [Mon, 9 Nov 2020 15:46:04 +0000 (16:46 +0100)] 
daemon/io refactor: don't expose unused io_deinit()

4 years agomodules: fix issues with dropped answers - resolve()
Vladimír Čunát [Wed, 4 Nov 2020 09:07:40 +0000 (10:07 +0100)] 
modules: fix issues with dropped answers - resolve()

Well... practically it still can't happen that an internal request
gets its answer dropped, but ATM my understanding of the API is that
it is allowed to happen already, and the crashes during tests were
bothering me (simulating drops).

This may become more relevant in future, e.g. if we allow dropping
as a policy action; policy authors may not care about the request being
internal.

4 years agodaemon/worker: allow dropping even on non-XDP
Vladimír Čunát [Tue, 3 Nov 2020 11:34:04 +0000 (12:34 +0100)] 
daemon/worker: allow dropping even on non-XDP

During testing it was sending me SERVFAIL, which was weird.
There's no use case so far, but if it was decided to drop the answer,
it should really happen regardless of the transport.

4 years agomodules: fix issues with dropped answers
Vladimír Čunát [Fri, 30 Oct 2020 15:29:44 +0000 (16:29 +0100)] 
modules: fix issues with dropped answers

4 years agolua net.listen(): default freebind = false
Vladimír Čunát [Fri, 30 Oct 2020 06:37:31 +0000 (07:37 +0100)] 
lua net.listen(): default freebind = false

It's unclear why it defaulted to true in TLS cases.

4 years agoXDP: add documentation
Vladimír Čunát [Mon, 26 Oct 2020 19:41:13 +0000 (20:41 +0100)] 
XDP: add documentation

4 years agomodules/policy TC(): better detection of non-UDP requests
Vladimír Čunát [Fri, 23 Oct 2020 09:11:38 +0000 (11:11 +0200)] 
modules/policy TC(): better detection of non-UDP requests

This amends commit 99e014ac635.

4 years agoXDP: add lua interfaces
Vladimír Čunát [Wed, 21 Oct 2020 16:07:43 +0000 (18:07 +0200)] 
XDP: add lua interfaces

4 years agodaemon/bindings net_listen_addrs(): pack parameters
Vladimír Čunát [Wed, 14 Oct 2020 16:28:26 +0000 (18:28 +0200)] 
daemon/bindings net_listen_addrs(): pack parameters

They're starting to be too many.  Also improve comments.

4 years agoXDP: add backend parts
Vladimír Čunát [Wed, 21 Oct 2020 15:25:18 +0000 (17:25 +0200)] 
XDP: add backend parts

Logging strings: I originally wanted to have four chars inside [],
but it doesn't really matter in these cases where logs don't happen
within a request, so "[xdp]" won due to uniformity and simplicity.

4 years agoMerge branch 'base64urlencode-query' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1234 obs-knot-dns-deve-jq0xxt/deployments/1237 obs-knot-resolver-es11k1/deployments/1233 obs-knot-resolver-es11k1/deployments/1236
Petr Špaček [Mon, 9 Nov 2020 09:17:10 +0000 (10:17 +0100)] 
Merge branch 'base64urlencode-query' into 'master'

scripts: utility to get base64 url encoded query for DoH GET

See merge request knot/knot-resolver!1089

4 years agoscripts: utility to get base64 url encoded query for DoH GET
Tomas Krizek [Thu, 5 Nov 2020 09:42:21 +0000 (10:42 +0100)] 
scripts: utility to get base64 url encoded query for DoH GET

4 years agoMerge branch 'distrotest-update' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1219 obs-knot-dns-deve-jq0xxt/deployments/1221 obs-knot-dns-deve-jq0xxt/deployments/1224 obs-knot-dns-deve-jq0xxt/deployments/1227 obs-knot-dns-deve-jq0xxt/deployments/1229 obs-knot-dns-deve-jq0xxt/deployments/1232 obs-knot-resolver-es11k1/deployments/1220 obs-knot-resolver-es11k1/deployments/1222 obs-knot-resolver-es11k1/deployments/1223 obs-knot-resolver-es11k1/deployments/1228 obs-knot-resolver-es11k1/deployments/1230 obs-knot-resolver-es11k1/deployments/1231
Tomas Krizek [Mon, 2 Nov 2020 17:29:07 +0000 (18:29 +0100)] 
Merge branch 'distrotest-update' into 'master'

distro/tests: update distributions

See merge request knot/knot-resolver!1088

4 years agodistro/tests: update DNSSEC bogus test obs-knot-resolver-bs4hbr/deployments/1218
Tomas Krizek [Mon, 2 Nov 2020 10:17:59 +0000 (11:17 +0100)] 
distro/tests: update DNSSEC bogus test

dnssec-failed.org domain uses RSA/SHA1 algorithm, which is considered
insecure by Fedora 33+ policy.

4 years agodistro/tests: update distributions
Tomas Krizek [Fri, 30 Oct 2020 15:30:38 +0000 (16:30 +0100)] 
distro/tests: update distributions

- update fedora to 33
- update ubuntu rolling to groovy

4 years agoMerge branch 'pretty-print' into 'master'
Tomas Krizek [Mon, 2 Nov 2020 11:38:13 +0000 (12:38 +0100)] 
Merge branch 'pretty-print' into 'master'

new pretty printer

See merge request knot/knot-resolver!1027

4 years agokrprint: nitpick from review
Petr Špaček [Mon, 2 Nov 2020 09:26:35 +0000 (10:26 +0100)] 
krprint: nitpick from review

4 years agotests: cover table_print
Petr Špaček [Tue, 27 Oct 2020 10:25:28 +0000 (11:25 +0100)] 
tests: cover table_print

4 years agokrprint: escape non-printable strings in error messages
Petr Špaček [Tue, 27 Oct 2020 10:24:19 +0000 (11:24 +0100)] 
krprint: escape non-printable strings in error messages

All strings should be properly escaped but some non-escaped versions
were leaking into error messages.

4 years agokrprint: allow tab and newline in pretty printer
Petr Špaček [Mon, 26 Oct 2020 18:06:40 +0000 (19:06 +0100)] 
krprint: allow tab and newline in pretty printer

Functions like trust_anchors.summary() return strings including tabs and
newlines, so we do not escape those for human-readable output.

4 years agotty: do not print extra newline after empty messages
Petr Špaček [Mon, 26 Oct 2020 17:38:29 +0000 (18:38 +0100)] 
tty: do not print extra newline after empty messages

In case nothing (not even nil) is returned then do not print newline
after the zero-length message. This avoids unambiguous empty line in
output (is it an empty string which got printed?).

4 years agotable_print: print multiple values
Petr Špaček [Mon, 20 Jul 2020 09:08:00 +0000 (11:08 +0200)] 
table_print: print multiple values

This change allows sandbox to pretty-print return values from functions
which return multiple values, e.g. future net.bufsize() from MR !1026.

4 years agoreplace sandbox table_print with new pretty printer
Petr Špaček [Mon, 20 Jul 2020 07:46:10 +0000 (09:46 +0200)] 
replace sandbox table_print with new pretty printer

This slightly changes table_print() output format.
table_print() output is not intended for machine consumption,
use krprint.serialize_lua() or JSON for that purpose.

Output from table_print is now a valid Lua expression
if the input contains only serializable data types
(number, string, bool, nil, table), which is nice for copy&pasting.

Functions etc. are also pretty-printed but cannot be deserialized.
Numbers are pretty-printed as well so their precision is reduced (as
compared to krprint.serialize_lua).

4 years agokrprint: feature parity between old table_print and new pretty printer
Petr Špaček [Fri, 17 Jul 2020 15:18:26 +0000 (17:18 +0200)] 
krprint: feature parity between old table_print and new pretty printer

4 years agokrprint: support pretty-printing functions
Petr Špaček [Fri, 17 Jul 2020 08:33:49 +0000 (10:33 +0200)] 
krprint: support pretty-printing functions

4 years agokrprint: order keys while pretty-printing tables
Petr Špaček [Fri, 17 Jul 2020 08:08:25 +0000 (10:08 +0200)] 
krprint: order keys while pretty-printing tables

Code was copied from Lua sandbox, the old copy is to be removed once new
pretty-printer is finished.

4 years agokrprint: reuse serialization infrastructure for pretty-printer
Petr Špaček [Fri, 17 Jul 2020 07:58:54 +0000 (09:58 +0200)] 
krprint: reuse serialization infrastructure for pretty-printer

At the moment it does not handle functions and other non-serializable
types.

4 years agotable_print: sort numbers by their value instead of lexicographic representation
Petr Špaček [Fri, 10 Jul 2020 20:09:46 +0000 (22:09 +0200)] 
table_print: sort numbers by their value instead of lexicographic representation

Side-effect is that keys are grouped by their type, so numbers come
first and strings later..

4 years agotable_print: fix printing tables with key = false
Petr Špaček [Fri, 10 Jul 2020 19:59:51 +0000 (21:59 +0200)] 
table_print: fix printing tables with key = false

4 years agoMerge branch 'doc-polish' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1209 obs-knot-dns-deve-jq0xxt/deployments/1212 obs-knot-dns-deve-jq0xxt/deployments/1214 obs-knot-dns-deve-jq0xxt/deployments/1215 obs-knot-resolver-es11k1/deployments/1208 obs-knot-resolver-es11k1/deployments/1211 obs-knot-resolver-es11k1/deployments/1213 obs-knot-resolver-es11k1/deployments/1216
Tomas Krizek [Thu, 29 Oct 2020 09:51:13 +0000 (10:51 +0100)] 
Merge branch 'doc-polish' into 'master'

5.2.0 doc polish

See merge request knot/knot-resolver!1087

4 years agodoc: document planned --forks removal
Petr Špaček [Tue, 27 Oct 2020 16:15:28 +0000 (17:15 +0100)] 
doc: document planned --forks removal

4 years agodoc: net.bufsize clarification
Petr Špaček [Tue, 27 Oct 2020 14:47:48 +0000 (15:47 +0100)] 
doc: net.bufsize clarification

4 years agodoc: DNS Flag Day 2020 is now effective
Petr Špaček [Tue, 27 Oct 2020 14:40:27 +0000 (15:40 +0100)] 
doc: DNS Flag Day 2020 is now effective

4 years agodoh: clarify warning about legacy DoH in docs
Petr Špaček [Tue, 27 Oct 2020 11:37:00 +0000 (12:37 +0100)] 
doh: clarify warning about legacy DoH in docs

4 years agodoh2: replace references to obsolete DoH in docs, tests and example configs
Petr Špaček [Tue, 27 Oct 2020 11:30:19 +0000 (12:30 +0100)] 
doh2: replace references to obsolete DoH in docs, tests and example configs

4 years agoMerge branch '554-lua-command-map-does-not-work' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1204 obs-knot-dns-deve-jq0xxt/deployments/1206 obs-knot-resolver-es11k1/deployments/1205 obs-knot-resolver-es11k1/deployments/1207
Petr Špaček [Tue, 27 Oct 2020 10:45:01 +0000 (11:45 +0100)] 
Merge branch '554-lua-command-map-does-not-work' into 'master'

Reimplement map()

Closes #620 and #554

See merge request knot/knot-resolver!1000

4 years agotests: control socket test improvements
Petr Špaček [Mon, 26 Oct 2020 08:28:47 +0000 (09:28 +0100)] 
tests: control socket test improvements

4 years agotests: fixes for control socket tests
Petr Špaček [Mon, 26 Oct 2020 08:10:37 +0000 (09:10 +0100)] 
tests: fixes for control socket tests

Error handling inside the test was incorrent and a detected error would
blow up the test routine.

Related: !1011, 3f5a826d4cb859522d073503dcc40e5c59353511

4 years agoNEWS: cleanup incompatible changes
Tomas Krizek [Mon, 26 Oct 2020 14:18:06 +0000 (15:18 +0100)] 
NEWS: cleanup incompatible changes

4 years agographite: adapt to to changes in map()
Petr Špaček [Fri, 23 Oct 2020 16:07:59 +0000 (18:07 +0200)] 
graphite: adapt to to changes in map()

We don't have leader instance anymore, so each instance independently
provides Graphite statistics.

This commit also changes default Graphite prefix to solve problem
with conflicting instance names.

4 years agoworker: migrate worker.id to string
Petr Špaček [Fri, 23 Oct 2020 15:48:41 +0000 (17:48 +0200)] 
worker: migrate worker.id to string

It now contains either content of SYSTEMD_INSTANCE environment variable
or stringified version of getpid() value.

Main motivation is that the old worker.id was broken on systemd,
i.e. the default installation.

Related: #631

4 years agodoc: document new command buffering scheme
Petr Špaček [Fri, 23 Oct 2020 15:34:31 +0000 (17:34 +0200)] 
doc: document new command buffering scheme

Fixup for c0b5faf222dfa6e8db94838c18331e7147a37128.

4 years agohttp: adapt Prometheus to changes in map()
Petr Špaček [Fri, 23 Oct 2020 13:31:28 +0000 (15:31 +0200)] 
http: adapt Prometheus to changes in map()

We don't have leader instance anymore, so any instance can provide
Prometheus statistics.

For performance reasons an instance does not store past statistics
when no client is connected to HTTP socket. As a consequence chart in
web interface is empty when client loads the page and then gradually
chart fills up.

4 years agoprometheus: run on all instances
Petr Špaček [Fri, 23 Oct 2020 12:33:33 +0000 (14:33 +0200)] 
prometheus: run on all instances

4 years agomap: document internal use
Petr Špaček [Thu, 22 Oct 2020 11:15:50 +0000 (13:15 +0200)] 
map: document internal use

4 years agosystemd: control socket cleanup on exit
Petr Špaček [Thu, 22 Oct 2020 10:31:30 +0000 (12:31 +0200)] 
systemd: control socket cleanup on exit

Obviously this is is racy and cannot be relied upon.
Caller still has to handle connection errors.

4 years agokluautil.list_dir: make it portable to non-Linux
Vladimír Čunát [Thu, 22 Oct 2020 09:17:49 +0000 (11:17 +0200)] 
kluautil.list_dir: make it portable to non-Linux

4 years agogitignore: add missing files created by kresd when executed in worktree
Petr Špaček [Thu, 22 Oct 2020 07:10:28 +0000 (09:10 +0200)] 
gitignore: add missing files created by kresd when executed in worktree

New map() creates control/ sockets in current working directory so it
pollutes worktree when developers run it in worktree.

I've also added files with ephemeral certificates and pytests test report
which were missing as well.

4 years agomap: tests
Petr Špaček [Fri, 16 Oct 2020 11:50:11 +0000 (13:50 +0200)] 
map: tests

Three instances send commands and DNS queries to each other.

4 years agomap: disallow commands with \n
Petr Špaček [Tue, 20 Oct 2020 12:30:40 +0000 (14:30 +0200)] 
map: disallow commands with \n

Control protocol uses \n as command delimiter so we cannot allow \n
inside commands. Users should be able to Lua-escape \n with \010.

4 years agomap: prevent crash on unrepresentable responses
Petr Špaček [Tue, 20 Oct 2020 11:51:54 +0000 (13:51 +0200)] 
map: prevent crash on unrepresentable responses

Typical example of unrepresentable message is a Lua error.
E.g. error() called from kresc would lead to NULL message.

4 years agomap: thorough error checking on control socket operations
Petr Špaček [Tue, 20 Oct 2020 11:04:23 +0000 (13:04 +0200)] 
map: thorough error checking on control socket operations

4 years agotests: detect missing environment variable TEST_FILE
Petr Špaček [Fri, 16 Oct 2020 08:19:14 +0000 (10:19 +0200)] 
tests: detect missing environment variable TEST_FILE

4 years agokluautil: remove hard depedency on lua-cqueues
Petr Špaček [Fri, 16 Oct 2020 08:15:32 +0000 (10:15 +0200)] 
kluautil: remove hard depedency on lua-cqueues

For now we still attempt to support systems without lua-cqueues,
e.g. Ubuntu 16.04.

lua-http depends on lua-cqueues so the test for availability of lua-http
at the beginning of kr_https_fetch() should cover lua-cqueues as well.

4 years agotests: limit number of iterations for krprint.serialize_lua to please CI
Petr Špaček [Wed, 14 Oct 2020 16:05:23 +0000 (18:05 +0200)] 
tests: limit number of iterations for krprint.serialize_lua to please CI

We were exceeding CI time limit while running config tests under
Valgrind so let's see if smaller number of tests will get us through CI.

4 years agodaf: adapt to changes in map result handling
Petr Špaček [Wed, 14 Oct 2020 15:22:51 +0000 (17:22 +0200)] 
daf: adapt to changes in map result handling

4 years agomap: logging for weird responses
Petr Špaček [Wed, 14 Oct 2020 15:18:03 +0000 (17:18 +0200)] 
map: logging for weird responses

4 years agomap: rework result handling
Petr Špaček [Wed, 14 Oct 2020 09:08:43 +0000 (11:08 +0200)] 
map: rework result handling

map() command on leader instance now:
- detects call errors on followers
- detects unsupported number of return values
- detects unsupported data types which cannot be serialized
- keeps nil return values (signaled by table counter "n")

Fixes: #662
4 years agomap: input command validation
Petr Špaček [Wed, 14 Oct 2020 07:24:23 +0000 (09:24 +0200)] 
map: input command validation

Let's detect syntax errors before sending the command to all instances.

4 years agokluautil: table pack and unpack
Petr Špaček [Tue, 13 Oct 2020 15:53:37 +0000 (17:53 +0200)] 
kluautil: table pack and unpack

Helper functions for handling variable length arrays with nil values.

4 years agomap: stricter argument checking
Petr Špaček [Tue, 13 Oct 2020 15:05:59 +0000 (17:05 +0200)] 
map: stricter argument checking

4 years agotests: adapt config tests to new map()
Petr Špaček [Tue, 13 Oct 2020 10:54:16 +0000 (12:54 +0200)] 
tests: adapt config tests to new map()

map() now depends on presence of control sockets, and by default config
tests are executed with KRESD_NO_LISTEN=1 env var which prevents control
sockets from being created. Tests for features which depend on map() now
explicitly create their own control socket.

4 years agotests: improve process cleanup after config tests
Petr Špaček [Tue, 13 Oct 2020 10:53:07 +0000 (12:53 +0200)] 
tests: improve process cleanup after config tests

Previously exit trap executed command "kill -9" even if there were no
leftover processes and this lead to clutter in logs because kill
complained about missing arguments.

As a bonus the cleanup routine now prints information about leftover
processes.

4 years agodaemon: always listen on control socket, even in interactive mode
Petr Špaček [Tue, 21 Jul 2020 12:11:53 +0000 (14:11 +0200)] 
daemon: always listen on control socket, even in interactive mode

Reasons:
- It allows to run several kresd instances and use map() without
  worrying about instance parameters.
- It removes special case from map().

Proper functionality depends on changes in MR !1011.

4 years agokrprint.serialize_lua: rename function parameter to on_unpresentable
Petr Špaček [Mon, 20 Jul 2020 09:17:23 +0000 (11:17 +0200)] 
krprint.serialize_lua: rename function parameter to on_unpresentable

4 years agonew serialization method krprint.serialize_lua
Petr Špaček [Fri, 10 Jul 2020 12:32:25 +0000 (14:32 +0200)] 
new serialization method krprint.serialize_lua

Serializes: boolean, nil, number, string, table.
Skips all other types (functions, cdata, thread ...) and repeated
references to tables.

Resulting string should Lua-evaluate to identical objects.

4 years agomap: use control sockets instead of pipe from parent process
Lukáš Ježek [Mon, 27 Apr 2020 12:00:17 +0000 (14:00 +0200)] 
map: use control sockets instead of pipe from parent process

This change allows map() to work with systemd integration.

As a bonus the new client implementation is based on Lua cqueues
allows caller to wrap map() in worker.corroutine() and get
asynchronous execution/avoid blocking main loop.

Currently socket communication does not employ timeouts so a hang
instance will lead to hang map() call. This does not affect query
processing _if_ map() is being run in worker.corroutine.

Fixes: #554
Fixes: #620
4 years agoMerge branch '538-lower-default-edns-buffer-size-to-1232' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1194 obs-knot-dns-deve-jq0xxt/deployments/1196 obs-knot-dns-deve-jq0xxt/deployments/1198 obs-knot-dns-deve-jq0xxt/deployments/1201 obs-knot-dns-deve-jq0xxt/deployments/1202 obs-knot-resolver-es11k1/deployments/1195 obs-knot-resolver-es11k1/deployments/1197 obs-knot-resolver-es11k1/deployments/1199 obs-knot-resolver-es11k1/deployments/1200 obs-knot-resolver-es11k1/deployments/1203
Tomas Krizek [Fri, 23 Oct 2020 08:59:48 +0000 (10:59 +0200)] 
Merge branch '538-lower-default-edns-buffer-size-to-1232' into 'master'

daemon: lower EDNS buffer size to 1232

Closes #300 and #538

See merge request knot/knot-resolver!920

4 years agoci/respdiff: keep bufsize towards respdiff at 4K
Vladimír Čunát [Fri, 11 Sep 2020 15:39:37 +0000 (17:39 +0200)] 
ci/respdiff: keep bufsize towards respdiff at 4K

Note: this commits affects just the small respdiffs, not the big ones.

4 years agodocs: EDNS bufsize = 1232
Petr Špaček [Mon, 3 Feb 2020 14:11:15 +0000 (15:11 +0100)] 
docs: EDNS bufsize = 1232