- Nov 02, 2020
-
-
Petr Špaček authored
-
Petr Špaček authored
-
Petr Špaček authored
All strings should be properly escaped but some non-escaped versions were leaking into error messages.
-
Petr Špaček authored
Functions like trust_anchors.summary() return strings including tabs and newlines, so we do not escape those for human-readable output.
-
Petr Špaček authored
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?).
-
Petr Špaček authored
This change allows sandbox to pretty-print return values from functions which return multiple values, e.g. future net.bufsize() from MR !1026.
-
Petr Špaček authored
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).
-
Petr Špaček authored
-
Petr Špaček authored
-
Petr Špaček authored
Code was copied from Lua sandbox, the old copy is to be removed once new pretty-printer is finished.
-
Petr Špaček authored
At the moment it does not handle functions and other non-serializable types.
-
Petr Špaček authored
Side-effect is that keys are grouped by their type, so numbers come first and strings later..
-
Petr Špaček authored
-
- Oct 29, 2020
-
-
Petr Špaček authored
-
- Oct 27, 2020
-
-
Petr Špaček authored
-
Petr Špaček authored
Error handling inside the test was incorrent and a detected error would blow up the test routine. Related: !1011, 3f5a826d
-
Petr Špaček authored
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
-
- Oct 26, 2020
-
-
-
-
Three instances send commands and DNS queries to each other.
-
Control protocol uses \n as command delimiter so we cannot allow \n inside commands. Users should be able to Lua-escape \n with \010.
-
Typical example of unrepresentable message is a Lua error. E.g. error() called from kresc would lead to NULL message.
-
-
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.
-
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.
-
-
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
-
Let's detect syntax errors before sending the command to all instances.
-
Helper functions for handling variable length arrays with nil values.
-
-
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.
-
-
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.
-
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
-
- Oct 23, 2020
-
-
- Oct 21, 2020
-
-
Vladimír Čunát authored
FIXME: see FIXMEs in diff, document the API change, re-review.
-
- Oct 20, 2020
-
-
Two styles were used: (un)defined and 0/1. We switch to 0/1. Advantage: it can be used also like `if (ENABLE_FOO)` (outside preprocessor). Except for ./meson.build it's sed \ -e 's/#ifdef ENABLE_CAP_NG/#if ENABLE_CAP_NG/g' \ -e 's/#ifdef ENABLE_DOH2/#if ENABLE_DOH2/g' \ -e 's/defined(ENABLE_COOKIES)/ENABLE_COOKIES/g' \ -e 's/#ifdef ENABLE_COOKIES/#if ENABLE_COOKIES/g' \ -i $(git grep -l ENABLE_)
-
- Oct 15, 2020
-
-
-
Lukas Jezek authored
-
- Oct 13, 2020
-
-
Tomas Krizek authored
When http_write() returns non-zero, worker_submit() performs the task cleanup and calling on_write() callback only causes double free.
-