From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id DF099249D4 for ; Mon, 22 Jul 2019 05:18:50 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id P0wNnk5kkm8u for ; Mon, 22 Jul 2019 05:18:50 -0400 (EDT) Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 5607E249C2 for ; Mon, 22 Jul 2019 05:18:50 -0400 (EDT) Received: by mail-wr1-f66.google.com with SMTP id x1so23593584wrr.9 for ; Mon, 22 Jul 2019 02:18:50 -0700 (PDT) MIME-Version: 1.0 From: Maria K Date: Mon, 22 Jul 2019 12:18:36 +0300 Message-ID: Subject: [tarantool-patches] [PATCH] Initial box.cfg call logs changes now Content-Type: multipart/alternative; boundary="0000000000005101a5058e419040" Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: tarantool-patches@freelists.org Cc: georgy@tarantool.org --0000000000005101a5058e419040 Content-Type: text/plain; charset="UTF-8" In contrast to subsequent calls, the initial call to box.cfg didn't log configuration changes to the default state. As a result, by looking at a log file we couldn't tell which configuration was being used. Closes #4236 --- src/box/lua/load_cfg.lua | 6 +- test/box/cfg.result | 900 +++++++++++++++++++------------------ test/box/cfg.test.lua | 9 + test/box/lua/cfg_test5.lua | 10 + 4 files changed, 497 insertions(+), 428 deletions(-) create mode 100644 test/box/lua/cfg_test5.lua diff --git a/src/box/lua/load_cfg.lua b/src/box/lua/load_cfg.lua index 83e99e854..d402468ab 100644 --- a/src/box/lua/load_cfg.lua +++ b/src/box/lua/load_cfg.lua @@ -492,8 +492,10 @@ local function load_cfg(cfg) private.cfg_load() for key, fun in pairs(dynamic_cfg) do local val = cfg[key] - if val ~= nil and not dynamic_cfg_skip_at_load[key] then - fun() + if val ~= nil then + if not dynamic_cfg_skip_at_load[key] then + fun() + end if not compare_cfg(val, default_cfg[key]) then log.info("set '%s' configuration option to %s", key, json.encode(val)) end diff --git a/test/box/cfg.result b/test/box/cfg.result index d85ec634c..cdca64ef0 100644 --- a/test/box/cfg.result +++ b/test/box/cfg.result @@ -1,538 +1,586 @@ +-- test-run result file version 2 env = require('test_run') ---- -... + | --- + | ... test_run = env.new() ---- -... + | --- + | ... test_run:cmd("push filter '(error: .*)\\.lua:[0-9]+: ' to '\\1.lua:: '") ---- -- true -... + | --- + | - true + | ... box.cfg.nosuchoption = 1 ---- -- error: 'builtin/box/load_cfg.lua:: Attempt to modify a read-only table' -... + | --- + | - error: 'builtin/box/load_cfg.lua:: Attempt to modify a read-only table' + | ... cfg_filter(box.cfg) ---- -- - - background - - false - - - checkpoint_count - - 2 - - - checkpoint_interval - - 3600 - - - checkpoint_wal_threshold - - 1000000000000000000 - - - coredump - - false - - - feedback_enabled - - true - - - feedback_host - - https://feedback.tarantool.io - - - feedback_interval - - 3600 - - - force_recovery - - false - - - hot_standby - - false - - - listen - - - - - log - - - - - log_format - - plain - - - log_level - - 5 - - - memtx_dir - - - - - memtx_max_tuple_size - - - - - memtx_memory - - 107374182 - - - memtx_min_tuple_size - - - - - net_msg_max - - 768 - - - pid_file - - - - - read_only - - false - - - readahead - - 16320 - - - replication_connect_timeout - - 30 - - - replication_skip_conflict - - false - - - replication_sync_lag - - 10 - - - replication_sync_timeout - - 300 - - - replication_timeout - - 1 - - - rows_per_wal - - 500000 - - - slab_alloc_factor - - 1.05 - - - strip_core - - true - - - too_long_threshold - - 0.5 - - - vinyl_bloom_fpr - - 0.05 - - - vinyl_cache - - 134217728 - - - vinyl_dir - - - - - vinyl_max_tuple_size - - 1048576 - - - vinyl_memory - - 134217728 - - - vinyl_page_size - - 8192 - - - vinyl_read_threads - - 1 - - - vinyl_run_count_per_level - - 2 - - - vinyl_run_size_ratio - - 3.5 - - - vinyl_timeout - - 60 - - - vinyl_write_threads - - 4 - - - wal_dir - - - - - wal_dir_rescan_delay - - 2 - - - wal_max_size - - 268435456 - - - wal_mode - - write - - - worker_pool_threads - - 4 -... + | --- + | - - - background + | - false + | - - checkpoint_count + | - 2 + | - - checkpoint_interval + | - 3600 + | - - checkpoint_wal_threshold + | - 1000000000000000000 + | - - coredump + | - false + | - - feedback_enabled + | - true + | - - feedback_host + | - https://feedback.tarantool.io + | - - feedback_interval + | - 3600 + | - - force_recovery + | - false + | - - hot_standby + | - false + | - - listen + | - + | - - log + | - + | - - log_format + | - plain + | - - log_level + | - 5 + | - - memtx_dir + | - + | - - memtx_max_tuple_size + | - + | - - memtx_memory + | - 107374182 + | - - memtx_min_tuple_size + | - + | - - net_msg_max + | - 768 + | - - pid_file + | - + | - - read_only + | - false + | - - readahead + | - 16320 + | - - replication_connect_timeout + | - 30 + | - - replication_skip_conflict + | - false + | - - replication_sync_lag + | - 10 + | - - replication_sync_timeout + | - 300 + | - - replication_timeout + | - 1 + | - - rows_per_wal + | - 500000 + | - - slab_alloc_factor + | - 1.05 + | - - strip_core + | - true + | - - too_long_threshold + | - 0.5 + | - - vinyl_bloom_fpr + | - 0.05 + | - - vinyl_cache + | - 134217728 + | - - vinyl_dir + | - + | - - vinyl_max_tuple_size + | - 1048576 + | - - vinyl_memory + | - 134217728 + | - - vinyl_page_size + | - 8192 + | - - vinyl_read_threads + | - 1 + | - - vinyl_run_count_per_level + | - 2 + | - - vinyl_run_size_ratio + | - 3.5 + | - - vinyl_timeout + | - 60 + | - - vinyl_write_threads + | - 4 + | - - wal_dir + | - + | - - wal_dir_rescan_delay + | - 2 + | - - wal_max_size + | - 268435456 + | - - wal_mode + | - write + | - - worker_pool_threads + | - 4 + | ... -- must be read-only box.cfg() ---- -... + | --- + | ... cfg_filter(box.cfg) ---- -- - - background - - false - - - checkpoint_count - - 2 - - - checkpoint_interval - - 3600 - - - checkpoint_wal_threshold - - 1000000000000000000 - - - coredump - - false - - - feedback_enabled - - true - - - feedback_host - - https://feedback.tarantool.io - - - feedback_interval - - 3600 - - - force_recovery - - false - - - hot_standby - - false - - - listen - - - - - log - - - - - log_format - - plain - - - log_level - - 5 - - - memtx_dir - - - - - memtx_max_tuple_size - - - - - memtx_memory - - 107374182 - - - memtx_min_tuple_size - - - - - net_msg_max - - 768 - - - pid_file - - - - - read_only - - false - - - readahead - - 16320 - - - replication_connect_timeout - - 30 - - - replication_skip_conflict - - false - - - replication_sync_lag - - 10 - - - replication_sync_timeout - - 300 - - - replication_timeout - - 1 - - - rows_per_wal - - 500000 - - - slab_alloc_factor - - 1.05 - - - strip_core - - true - - - too_long_threshold - - 0.5 - - - vinyl_bloom_fpr - - 0.05 - - - vinyl_cache - - 134217728 - - - vinyl_dir - - - - - vinyl_max_tuple_size - - 1048576 - - - vinyl_memory - - 134217728 - - - vinyl_page_size - - 8192 - - - vinyl_read_threads - - 1 - - - vinyl_run_count_per_level - - 2 - - - vinyl_run_size_ratio - - 3.5 - - - vinyl_timeout - - 60 - - - vinyl_write_threads - - 4 - - - wal_dir - - - - - wal_dir_rescan_delay - - 2 - - - wal_max_size - - 268435456 - - - wal_mode - - write - - - worker_pool_threads - - 4 -... + | --- + | - - - background + | - false + | - - checkpoint_count + | - 2 + | - - checkpoint_interval + | - 3600 + | - - checkpoint_wal_threshold + | - 1000000000000000000 + | - - coredump + | - false + | - - feedback_enabled + | - true + | - - feedback_host + | - https://feedback.tarantool.io + | - - feedback_interval + | - 3600 + | - - force_recovery + | - false + | - - hot_standby + | - false + | - - listen + | - + | - - log + | - + | - - log_format + | - plain + | - - log_level + | - 5 + | - - memtx_dir + | - + | - - memtx_max_tuple_size + | - + | - - memtx_memory + | - 107374182 + | - - memtx_min_tuple_size + | - + | - - net_msg_max + | - 768 + | - - pid_file + | - + | - - read_only + | - false + | - - readahead + | - 16320 + | - - replication_connect_timeout + | - 30 + | - - replication_skip_conflict + | - false + | - - replication_sync_lag + | - 10 + | - - replication_sync_timeout + | - 300 + | - - replication_timeout + | - 1 + | - - rows_per_wal + | - 500000 + | - - slab_alloc_factor + | - 1.05 + | - - strip_core + | - true + | - - too_long_threshold + | - 0.5 + | - - vinyl_bloom_fpr + | - 0.05 + | - - vinyl_cache + | - 134217728 + | - - vinyl_dir + | - + | - - vinyl_max_tuple_size + | - 1048576 + | - - vinyl_memory + | - 134217728 + | - - vinyl_page_size + | - 8192 + | - - vinyl_read_threads + | - 1 + | - - vinyl_run_count_per_level + | - 2 + | - - vinyl_run_size_ratio + | - 3.5 + | - - vinyl_timeout + | - 60 + | - - vinyl_write_threads + | - 4 + | - - wal_dir + | - + | - - wal_dir_rescan_delay + | - 2 + | - - wal_max_size + | - 268435456 + | - - wal_mode + | - write + | - - worker_pool_threads + | - 4 + | ... + -- check that cfg with unexpected parameter fails. box.cfg{sherlock = 'holmes'} ---- -- error: 'Incorrect value for option ''sherlock'': unexpected option' -... + | --- + | - error: 'Incorrect value for option ''sherlock'': unexpected option' + | ... + -- check that cfg with unexpected type of parameter fails box.cfg{listen = {}} ---- -- error: 'Incorrect value for option ''listen'': should be one of types string, number' -... + | --- + | - error: 'Incorrect value for option ''listen'': should be one of types string, number' + | ... box.cfg{wal_dir = 0} ---- -- error: 'Incorrect value for option ''wal_dir'': should be of type string' -... + | --- + | - error: 'Incorrect value for option ''wal_dir'': should be of type string' + | ... box.cfg{coredump = 'true'} ---- -- error: 'Incorrect value for option ''coredump'': should be of type boolean' -... + | --- + | - error: 'Incorrect value for option ''coredump'': should be of type boolean' + | ... + -- check comment to issue #2191 - bad argument #2 to ''uri_parse'' box.cfg{replication = {}} ---- -... + | --- + | ... box.cfg{replication = {}} ---- -... + | --- + | ... + -------------------------------------------------------------------------------- -- Test of hierarchical cfg type check -------------------------------------------------------------------------------- + box.cfg{memtx_memory = "100500"} ---- -- error: 'Incorrect value for option ''memtx_memory'': should be of type number' -... + | --- + | - error: 'Incorrect value for option ''memtx_memory'': should be of type number' + | ... box.cfg{memtx_memory = -1} ---- -- error: 'Incorrect value for option ''memtx_memory'': must not be less than 0' -... + | --- + | - error: 'Incorrect value for option ''memtx_memory'': must not be less than 0' + | ... box.cfg{vinyl_memory = -1} ---- -- error: 'Incorrect value for option ''vinyl_memory'': must not be less than 0' -... + | --- + | - error: 'Incorrect value for option ''vinyl_memory'': must not be less than 0' + | ... box.cfg{vinyl = "vinyl"} ---- -- error: 'Incorrect value for option ''vinyl'': unexpected option' -... + | --- + | - error: 'Incorrect value for option ''vinyl'': unexpected option' + | ... box.cfg{vinyl_write_threads = "threads"} ---- -- error: 'Incorrect value for option ''vinyl_write_threads'': should be of type number' -... + | --- + | - error: 'Incorrect value for option ''vinyl_write_threads'': should be of type number' + | ... + -------------------------------------------------------------------------------- -- Dynamic configuration check -------------------------------------------------------------------------------- + replication_sync_lag = box.cfg.replication_sync_lag ---- -... + | --- + | ... box.cfg{replication_sync_lag = 0.123} ---- -... + | --- + | ... box.cfg.replication_sync_lag ---- -- 0.123 -... + | --- + | - 0.123 + | ... box.cfg{replication_sync_lag = replication_sync_lag} ---- -... + | --- + | ... + replication_sync_timeout = box.cfg.replication_sync_timeout ---- -... + | --- + | ... box.cfg{replication_sync_timeout = 123} ---- -... + | --- + | ... box.cfg.replication_sync_timeout ---- -- 123 -... + | --- + | - 123 + | ... box.cfg{replication_sync_timeout = replication_sync_timeout} ---- -... + | --- + | ... + box.cfg{instance_uuid = box.info.uuid} ---- -... + | --- + | ... box.cfg{instance_uuid = '12345678-0123-5678-1234-abcdefabcdef'} ---- -- error: Can't set option 'instance_uuid' dynamically -... + | --- + | - error: Can't set option 'instance_uuid' dynamically + | ... + box.cfg{replicaset_uuid = box.info.cluster.uuid} ---- -... + | --- + | ... box.cfg{replicaset_uuid = '12345678-0123-5678-1234-abcdefabcdef'} ---- -- error: Can't set option 'replicaset_uuid' dynamically -... + | --- + | - error: Can't set option 'replicaset_uuid' dynamically + | ... + box.cfg{memtx_memory = box.cfg.memtx_memory} ---- -... + | --- + | ... box.cfg{vinyl_memory = box.cfg.vinyl_memory} ---- -... + | --- + | ... + -------------------------------------------------------------------------------- -- Test of default cfg options -------------------------------------------------------------------------------- + test_run:cmd('create server cfg_tester1 with script = "box/lua/cfg_test1.lua"') ---- -- true -... + | --- + | - true + | ... test_run:cmd("start server cfg_tester1") ---- -- true -... + | --- + | - true + | ... test_run:cmd('switch cfg_tester1') ---- -- true -... + | --- + | - true + | ... box.cfg.memtx_memory, box.cfg.slab_alloc_factor, box.cfg.vinyl_write_threads ---- -- 268435456 -- 1.05 -- 4 -... + | --- + | - 268435456 + | - 1.05 + | - 4 + | ... test_run:cmd("switch default") ---- -- true -... + | --- + | - true + | ... test_run:cmd("stop server cfg_tester1") ---- -- true -... + | --- + | - true + | ... test_run:cmd("cleanup server cfg_tester1") ---- -- true -... + | --- + | - true + | ... + test_run:cmd('create server cfg_tester2 with script = "box/lua/cfg_test2.lua"') ---- -- true -... + | --- + | - true + | ... test_run:cmd("start server cfg_tester2") ---- -- true -... + | --- + | - true + | ... test_run:cmd('switch cfg_tester2') ---- -- true -... + | --- + | - true + | ... box.cfg.memtx_memory, box.cfg.slab_alloc_factor, box.cfg.vinyl_write_threads ---- -- 214748364 -- 1.05 -- 4 -... + | --- + | - 214748364 + | - 1.05 + | - 4 + | ... test_run:cmd("switch default") ---- -- true -... + | --- + | - true + | ... test_run:cmd("stop server cfg_tester2") ---- -- true -... + | --- + | - true + | ... test_run:cmd("cleanup server cfg_tester2") ---- -- true -... + | --- + | - true + | ... + test_run:cmd('create server cfg_tester3 with script = "box/lua/cfg_test3.lua"') ---- -- true -... + | --- + | - true + | ... test_run:cmd("start server cfg_tester3") ---- -- true -... + | --- + | - true + | ... test_run:cmd('switch cfg_tester3') ---- -- true -... + | --- + | - true + | ... box.cfg.memtx_memory, box.cfg.slab_alloc_factor, box.cfg.vinyl_write_threads ---- -- 214748364 -- 1.05 -- 10 -... + | --- + | - 214748364 + | - 1.05 + | - 10 + | ... test_run:cmd("switch default") ---- -- true -... + | --- + | - true + | ... test_run:cmd("stop server cfg_tester3") ---- -- true -... + | --- + | - true + | ... test_run:cmd("cleanup server cfg_tester3") ---- -- true -... + | --- + | - true + | ... + test_run:cmd('create server cfg_tester4 with script = "box/lua/cfg_test4.lua"') ---- -- true -... + | --- + | - true + | ... test_run:cmd("start server cfg_tester4") ---- -- true -... + | --- + | - true + | ... test_run:cmd('switch cfg_tester4') ---- -- true -... + | --- + | - true + | ... box.cfg.memtx_memory, box.cfg.slab_alloc_factor, box.cfg.vinyl_write_threads ---- -- 268435456 -- 3.14 -- 4 -... + | --- + | - 268435456 + | - 3.14 + | - 4 + | ... test_run:cmd("switch default") ---- -- true -... + | --- + | - true + | ... test_run:cmd("stop server cfg_tester4") ---- -- true -... + | --- + | - true + | ... test_run:cmd("cleanup server cfg_tester4") ---- -- true -... + | --- + | - true + | ... + -------------------------------------------------------------------------------- -- Check fix for pid_file option overwritten by tarantoolctl -------------------------------------------------------------------------------- + test_run:cmd('create server cfg_tester5 with script = "box/lua/cfg_test1.lua"') ---- -- true -... + | --- + | - true + | ... test_run:cmd("start server cfg_tester5") ---- -- true -... + | --- + | - true + | ... test_run:cmd('switch cfg_tester5') ---- -- true -... + | --- + | - true + | ... box.cfg{pid_file = "current.pid"} ---- -... + | --- + | ... test_run:cmd("switch default") ---- -- true -... + | --- + | - true + | ... test_run:cmd("stop server cfg_tester5") ---- -- true -... + | --- + | - true + | ... test_run:cmd("cleanup server cfg_tester5") ---- -- true -... + | --- + | - true + | ... + -------------------------------------------------------------------------------- -- Check that 'vinyl_dir' cfg option is not checked as long as -- there is no vinyl indexes (issue #2664) -------------------------------------------------------------------------------- + test_run:cmd('create server cfg_tester with script = "box/lua/cfg_bad_vinyl_dir.lua"') ---- -- true -... + | --- + | - true + | ... test_run:cmd("start server cfg_tester") ---- -- true -... + | --- + | - true + | ... test_run:cmd('switch cfg_tester') ---- -- true -... + | --- + | - true + | ... _ = box.schema.space.create('test_memtx', {engine = 'memtx'}) ---- -... + | --- + | ... _ = box.space.test_memtx:create_index('pk') -- ok ---- -... + | --- + | ... _ = box.schema.space.create('test_vinyl', {engine = 'vinyl'}) ---- -... + | --- + | ... _ = box.space.test_vinyl:create_index('pk') -- error ---- -- error: can not access vinyl data directory -... + | --- + | - error: can not access vinyl data directory + | ... box.snapshot() ---- -- ok -... + | --- + | - ok + | ... test_run:cmd("restart server cfg_tester") + | test_run:cmd("switch default") ---- -- true -... + | --- + | - true + | ... test_run:cmd("stop server cfg_tester") ---- -- true -... + | --- + | - true + | ... test_run:cmd("cleanup server cfg_tester") ---- -- true -... + | --- + | - true + | ... + -- -- gh-3320: box.cfg{net_msg_max}. -- box.cfg{net_msg_max = 'invalid'} ---- -- error: 'Incorrect value for option ''net_msg_max'': should be of type number' -... + | --- + | - error: 'Incorrect value for option ''net_msg_max'': should be of type number' + | ... -- -- gh-3425: incorrect error message: must not contain 'iproto'. -- box.cfg{net_msg_max = 0} ---- -- error: 'Incorrect value for option ''net_msg_max'': minimal value is 2' -... + | --- + | - error: 'Incorrect value for option ''net_msg_max'': minimal value is 2' + | ... old = box.cfg.net_msg_max ---- -... + | --- + | ... box.cfg{net_msg_max = 2} ---- -... + | --- + | ... box.cfg{net_msg_max = old + 1000} ---- -... + | --- + | ... box.cfg{net_msg_max = old} ---- -... + | --- + | ... + test_run:cmd("clear filter") ---- -- true -... + | --- + | - true + | ... + +-- +-- gh-4236: initial box.cfg{} call did not log changes to default state +-- +test_run:cmd('create server cfg_tester6 with script = "box/lua/cfg_test5.lua"') + | --- + | - true + | ... +test_run:cmd("start server cfg_tester6") + | --- + | - true + | ... +test_run:grep_log('cfg_tester6', 'set \'vinyl_memory\' configuration option to 1073741824', 1000) + | --- + | - set 'vinyl_memory' configuration option to 1073741824 + | ... +test_run:cmd("stop server cfg_tester6") + | --- + | - true + | ... +test_run:cmd("cleanup server cfg_tester6") + | --- + | - true + | ... diff --git a/test/box/cfg.test.lua b/test/box/cfg.test.lua index eddeab126..56ccb6767 100644 --- a/test/box/cfg.test.lua +++ b/test/box/cfg.test.lua @@ -132,3 +132,12 @@ box.cfg{net_msg_max = old + 1000} box.cfg{net_msg_max = old} test_run:cmd("clear filter") + +-- +-- gh-4236: initial box.cfg{} call did not log changes to default state +-- +test_run:cmd('create server cfg_tester6 with script = "box/lua/cfg_test5.lua"') +test_run:cmd("start server cfg_tester6") +test_run:grep_log('cfg_tester6', 'set \'vinyl_memory\' configuration option to 1073741824', 1000) +test_run:cmd("stop server cfg_tester6") +test_run:cmd("cleanup server cfg_tester6") diff --git a/test/box/lua/cfg_test5.lua b/test/box/lua/cfg_test5.lua new file mode 100644 index 000000000..e3eb87392 --- /dev/null +++ b/test/box/lua/cfg_test5.lua @@ -0,0 +1,10 @@ +#!/usr/bin/env tarantool +os = require('os') + +box.cfg{ + listen = os.getenv("LISTEN"), + vinyl_memory = 1024 * 1024 * 1024 +} + +require('console').listen(os.getenv('ADMIN')) +box.schema.user.grant('guest', 'read,write,execute', 'universe') \ No newline at end of file -- 2.21.0 --0000000000005101a5058e419040 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
In contrast to subsequent calls, the initial call to box.c= fg didn't log
configuration changes to the default state. As a resul= t, by looking at
a log file we couldn't tell which configuration was= being used.

Closes #4236
---
=C2=A0src/box/lua/load_cfg.lua = =C2=A0 | =C2=A0 6 +-
=C2=A0test/box/cfg.result =C2=A0 =C2=A0 =C2=A0 =C2= =A0| 900 +++++++++++++++++++------------------
=C2=A0test/box/cfg.test.l= ua =C2=A0 =C2=A0 =C2=A0| =C2=A0 9 +
=C2=A0test/box/lua/cfg_test5.lua | = =C2=A010 +
=C2=A04 files changed, 497 insertions(+), 428 deletions(-)=C2=A0create mode 100644 test/box/lua/cfg_test5.lua

diff --git a/sr= c/box/lua/load_cfg.lua b/src/box/lua/load_cfg.lua
index 83e99e854..d4024= 68ab 100644
--- a/src/box/lua/load_cfg.lua
+++ b/src/box/lua/load_cfg= .lua
@@ -492,8 +492,10 @@ local function load_cfg(cfg)
=C2=A0 =C2=A0 = =C2=A0private.cfg_load()
=C2=A0 =C2=A0 =C2=A0for key, fun in pairs(dynam= ic_cfg) do
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0local val =3D cfg[key]
-= =C2=A0 =C2=A0 =C2=A0 =C2=A0if val ~=3D nil and not dynamic_cfg_skip_at_loa= d[key] then
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0fun()
+ =C2=A0= =C2=A0 =C2=A0 =C2=A0if val ~=3D nil then
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0if not dynamic_cfg_skip_at_load[key] then
+ =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0fun()
+ =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0end
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= if not compare_cfg(val, default_cfg[key]) then
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0log.info<= /a>("set '%s' configuration option to %s", key, json.enco= de(val))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0end
diff --g= it a/test/box/cfg.result b/test/box/cfg.result
index d85ec634c..cdca64ef= 0 100644
--- a/test/box/cfg.result
+++ b/test/box/cfg.result
@@ -1= ,538 +1,586 @@
+-- test-run result file version 2
=C2=A0env =3D requi= re('test_run')
----
-...
+ | ---
+ | ...
=C2=A0test_= run =3D env.new()
----
-...
+ | ---
+ | ...
=C2=A0test_run:c= md("push filter '(error: .*)\\.lua:[0-9]+: ' to '\\1.lua:&= lt;line>: '")
----
-- true
-...
+ | ---
+ | - tr= ue
+ | ...
=C2=A0box.cfg.nosuchoption =3D 1
----
-- error: '= ;builtin/box/load_cfg.lua:<line>: Attempt to modify a read-only table= '
-...
+ | ---
+ | - error: 'builtin/box/load_cfg.lua:<= line>: Attempt to modify a read-only table'
+ | ...
=C2=A0cfg_= filter(box.cfg)
----
-- - - background
- =C2=A0 =C2=A0- false
-= =C2=A0- - checkpoint_count
- =C2=A0 =C2=A0- 2
- =C2=A0- - checkpoint= _interval
- =C2=A0 =C2=A0- 3600
- =C2=A0- - checkpoint_wal_threshold<= br>- =C2=A0 =C2=A0- 1000000000000000000
- =C2=A0- - coredump
- =C2=A0= =C2=A0- false
- =C2=A0- - feedback_enabled
- =C2=A0 =C2=A0- true
= - =C2=A0- - feedback_host
- =C2=A0 =C2=A0-
https://feedback.tarantool.io
- =C2=A0- - feedback_inte= rval
- =C2=A0 =C2=A0- 3600
- =C2=A0- - force_recovery
- =C2=A0 =C2= =A0- false
- =C2=A0- - hot_standby
- =C2=A0 =C2=A0- false
- =C2=A0= - - listen
- =C2=A0 =C2=A0- <hidden>
- =C2=A0- - log
- =C2= =A0 =C2=A0- <hidden>
- =C2=A0- - log_format
- =C2=A0 =C2=A0- pl= ain
- =C2=A0- - log_level
- =C2=A0 =C2=A0- 5
- =C2=A0- - memtx_dir=
- =C2=A0 =C2=A0- <hidden>
- =C2=A0- - memtx_max_tuple_size
= - =C2=A0 =C2=A0- <hidden>
- =C2=A0- - memtx_memory
- =C2=A0 =C2= =A0- 107374182
- =C2=A0- - memtx_min_tuple_size
- =C2=A0 =C2=A0- <= hidden>
- =C2=A0- - net_msg_max
- =C2=A0 =C2=A0- 768
- =C2=A0- = - pid_file
- =C2=A0 =C2=A0- <hidden>
- =C2=A0- - read_only
-= =C2=A0 =C2=A0- false
- =C2=A0- - readahead
- =C2=A0 =C2=A0- 16320- =C2=A0- - replication_connect_timeout
- =C2=A0 =C2=A0- 30
- =C2=A0= - - replication_skip_conflict
- =C2=A0 =C2=A0- false
- =C2=A0- - repl= ication_sync_lag
- =C2=A0 =C2=A0- 10
- =C2=A0- - replication_sync_tim= eout
- =C2=A0 =C2=A0- 300
- =C2=A0- - replication_timeout
- =C2=A0= =C2=A0- 1
- =C2=A0- - rows_per_wal
- =C2=A0 =C2=A0- 500000
- =C2= =A0- - slab_alloc_factor
- =C2=A0 =C2=A0- 1.05
- =C2=A0- - strip_core=
- =C2=A0 =C2=A0- true
- =C2=A0- - too_long_threshold
- =C2=A0 =C2= =A0- 0.5
- =C2=A0- - vinyl_bloom_fpr
- =C2=A0 =C2=A0- 0.05
- =C2= =A0- - vinyl_cache
- =C2=A0 =C2=A0- 134217728
- =C2=A0- - vinyl_dir- =C2=A0 =C2=A0- <hidden>
- =C2=A0- - vinyl_max_tuple_size
- = =C2=A0 =C2=A0- 1048576
- =C2=A0- - vinyl_memory
- =C2=A0 =C2=A0- 1342= 17728
- =C2=A0- - vinyl_page_size
- =C2=A0 =C2=A0- 8192
- =C2=A0- = - vinyl_read_threads
- =C2=A0 =C2=A0- 1
- =C2=A0- - vinyl_run_count_p= er_level
- =C2=A0 =C2=A0- 2
- =C2=A0- - vinyl_run_size_ratio
- =C2= =A0 =C2=A0- 3.5
- =C2=A0- - vinyl_timeout
- =C2=A0 =C2=A0- 60
- = =C2=A0- - vinyl_write_threads
- =C2=A0 =C2=A0- 4
- =C2=A0- - wal_dir<= br>- =C2=A0 =C2=A0- <hidden>
- =C2=A0- - wal_dir_rescan_delay
-= =C2=A0 =C2=A0- 2
- =C2=A0- - wal_max_size
- =C2=A0 =C2=A0- 268435456=
- =C2=A0- - wal_mode
- =C2=A0 =C2=A0- write
- =C2=A0- - worker_po= ol_threads
- =C2=A0 =C2=A0- 4
-...
+ | ---
+ | - - - background=
+ | =C2=A0 =C2=A0 - false
+ | =C2=A0 - - checkpoint_count
+ | =C2= =A0 =C2=A0 - 2
+ | =C2=A0 - - checkpoint_interval
+ | =C2=A0 =C2=A0 -= 3600
+ | =C2=A0 - - checkpoint_wal_threshold
+ | =C2=A0 =C2=A0 - 100= 0000000000000000
+ | =C2=A0 - - coredump
+ | =C2=A0 =C2=A0 - false+ | =C2=A0 - - feedback_enabled
+ | =C2=A0 =C2=A0 - true
+ | =C2=A0 = - - feedback_host
+ | =C2=A0 =C2=A0 - https://feedback.tarantool.io
+ | =C2=A0 - - feedback_interv= al
+ | =C2=A0 =C2=A0 - 3600
+ | =C2=A0 - - force_recovery
+ | =C2= =A0 =C2=A0 - false
+ | =C2=A0 - - hot_standby
+ | =C2=A0 =C2=A0 - fal= se
+ | =C2=A0 - - listen
+ | =C2=A0 =C2=A0 - <hidden>
+ | = =C2=A0 - - log
+ | =C2=A0 =C2=A0 - <hidden>
+ | =C2=A0 - - log_= format
+ | =C2=A0 =C2=A0 - plain
+ | =C2=A0 - - log_level
+ | =C2= =A0 =C2=A0 - 5
+ | =C2=A0 - - memtx_dir
+ | =C2=A0 =C2=A0 - <hidde= n>
+ | =C2=A0 - - memtx_max_tuple_size
+ | =C2=A0 =C2=A0 - <hid= den>
+ | =C2=A0 - - memtx_memory
+ | =C2=A0 =C2=A0 - 107374182
= + | =C2=A0 - - memtx_min_tuple_size
+ | =C2=A0 =C2=A0 - <hidden>+ | =C2=A0 - - net_msg_max
+ | =C2=A0 =C2=A0 - 768
+ | =C2=A0 - - p= id_file
+ | =C2=A0 =C2=A0 - <hidden>
+ | =C2=A0 - - read_only+ | =C2=A0 =C2=A0 - false
+ | =C2=A0 - - readahead
+ | =C2=A0 =C2= =A0 - 16320
+ | =C2=A0 - - replication_connect_timeout
+ | =C2=A0 =C2= =A0 - 30
+ | =C2=A0 - - replication_skip_conflict
+ | =C2=A0 =C2=A0 -= false
+ | =C2=A0 - - replication_sync_lag
+ | =C2=A0 =C2=A0 - 10
= + | =C2=A0 - - replication_sync_timeout
+ | =C2=A0 =C2=A0 - 300
+ | = =C2=A0 - - replication_timeout
+ | =C2=A0 =C2=A0 - 1
+ | =C2=A0 - - r= ows_per_wal
+ | =C2=A0 =C2=A0 - 500000
+ | =C2=A0 - - slab_alloc_fact= or
+ | =C2=A0 =C2=A0 - 1.05
+ | =C2=A0 - - strip_core
+ | =C2=A0 = =C2=A0 - true
+ | =C2=A0 - - too_long_threshold
+ | =C2=A0 =C2=A0 - 0= .5
+ | =C2=A0 - - vinyl_bloom_fpr
+ | =C2=A0 =C2=A0 - 0.05
+ | =C2= =A0 - - vinyl_cache
+ | =C2=A0 =C2=A0 - 134217728
+ | =C2=A0 - - viny= l_dir
+ | =C2=A0 =C2=A0 - <hidden>
+ | =C2=A0 - - vinyl_max_tup= le_size
+ | =C2=A0 =C2=A0 - 1048576
+ | =C2=A0 - - vinyl_memory
+ = | =C2=A0 =C2=A0 - 134217728
+ | =C2=A0 - - vinyl_page_size
+ | =C2=A0= =C2=A0 - 8192
+ | =C2=A0 - - vinyl_read_threads
+ | =C2=A0 =C2=A0 - = 1
+ | =C2=A0 - - vinyl_run_count_per_level
+ | =C2=A0 =C2=A0 - 2
+= | =C2=A0 - - vinyl_run_size_ratio
+ | =C2=A0 =C2=A0 - 3.5
+ | =C2=A0= - - vinyl_timeout
+ | =C2=A0 =C2=A0 - 60
+ | =C2=A0 - - vinyl_write_= threads
+ | =C2=A0 =C2=A0 - 4
+ | =C2=A0 - - wal_dir
+ | =C2=A0 = =C2=A0 - <hidden>
+ | =C2=A0 - - wal_dir_rescan_delay
+ | =C2= =A0 =C2=A0 - 2
+ | =C2=A0 - - wal_max_size
+ | =C2=A0 =C2=A0 - 268435= 456
+ | =C2=A0 - - wal_mode
+ | =C2=A0 =C2=A0 - write
+ | =C2=A0 -= - worker_pool_threads
+ | =C2=A0 =C2=A0 - 4
+ | ...
=C2=A0-- must= be read-only
=C2=A0box.cfg()
----
-...
+ | ---
+ | ...
= =C2=A0cfg_filter(box.cfg)
----
-- - - background
- =C2=A0 =C2=A0- = false
- =C2=A0- - checkpoint_count
- =C2=A0 =C2=A0- 2
- =C2=A0- - = checkpoint_interval
- =C2=A0 =C2=A0- 3600
- =C2=A0- - checkpoint_wal_= threshold
- =C2=A0 =C2=A0- 1000000000000000000
- =C2=A0- - coredump- =C2=A0 =C2=A0- false
- =C2=A0- - feedback_enabled
- =C2=A0 =C2=A0= - true
- =C2=A0- - feedback_host
- =C2=A0 =C2=A0- https://feedback.tarantool.io
- =C2=A0- - fee= dback_interval
- =C2=A0 =C2=A0- 3600
- =C2=A0- - force_recovery
- = =C2=A0 =C2=A0- false
- =C2=A0- - hot_standby
- =C2=A0 =C2=A0- false- =C2=A0- - listen
- =C2=A0 =C2=A0- <hidden>
- =C2=A0- - log<= br>- =C2=A0 =C2=A0- <hidden>
- =C2=A0- - log_format
- =C2=A0 = =C2=A0- plain
- =C2=A0- - log_level
- =C2=A0 =C2=A0- 5
- =C2=A0- -= memtx_dir
- =C2=A0 =C2=A0- <hidden>
- =C2=A0- - memtx_max_tupl= e_size
- =C2=A0 =C2=A0- <hidden>
- =C2=A0- - memtx_memory
- = =C2=A0 =C2=A0- 107374182
- =C2=A0- - memtx_min_tuple_size
- =C2=A0 = =C2=A0- <hidden>
- =C2=A0- - net_msg_max
- =C2=A0 =C2=A0- 768- =C2=A0- - pid_file
- =C2=A0 =C2=A0- <hidden>
- =C2=A0- - re= ad_only
- =C2=A0 =C2=A0- false
- =C2=A0- - readahead
- =C2=A0 =C2= =A0- 16320
- =C2=A0- - replication_connect_timeout
- =C2=A0 =C2=A0- 3= 0
- =C2=A0- - replication_skip_conflict
- =C2=A0 =C2=A0- false
- = =C2=A0- - replication_sync_lag
- =C2=A0 =C2=A0- 10
- =C2=A0- - replic= ation_sync_timeout
- =C2=A0 =C2=A0- 300
- =C2=A0- - replication_timeo= ut
- =C2=A0 =C2=A0- 1
- =C2=A0- - rows_per_wal
- =C2=A0 =C2=A0- 50= 0000
- =C2=A0- - slab_alloc_factor
- =C2=A0 =C2=A0- 1.05
- =C2=A0-= - strip_core
- =C2=A0 =C2=A0- true
- =C2=A0- - too_long_threshold- =C2=A0 =C2=A0- 0.5
- =C2=A0- - vinyl_bloom_fpr
- =C2=A0 =C2=A0- 0.= 05
- =C2=A0- - vinyl_cache
- =C2=A0 =C2=A0- 134217728
- =C2=A0- - = vinyl_dir
- =C2=A0 =C2=A0- <hidden>
- =C2=A0- - vinyl_max_tuple= _size
- =C2=A0 =C2=A0- 1048576
- =C2=A0- - vinyl_memory
- =C2=A0 = =C2=A0- 134217728
- =C2=A0- - vinyl_page_size
- =C2=A0 =C2=A0- 8192- =C2=A0- - vinyl_read_threads
- =C2=A0 =C2=A0- 1
- =C2=A0- - vinyl= _run_count_per_level
- =C2=A0 =C2=A0- 2
- =C2=A0- - vinyl_run_size_ra= tio
- =C2=A0 =C2=A0- 3.5
- =C2=A0- - vinyl_timeout
- =C2=A0 =C2=A0= - 60
- =C2=A0- - vinyl_write_threads
- =C2=A0 =C2=A0- 4
- =C2=A0- = - wal_dir
- =C2=A0 =C2=A0- <hidden>
- =C2=A0- - wal_dir_rescan_= delay
- =C2=A0 =C2=A0- 2
- =C2=A0- - wal_max_size
- =C2=A0 =C2=A0-= 268435456
- =C2=A0- - wal_mode
- =C2=A0 =C2=A0- write
- =C2=A0- -= worker_pool_threads
- =C2=A0 =C2=A0- 4
-...
+ | ---
+ | - - - = background
+ | =C2=A0 =C2=A0 - false
+ | =C2=A0 - - checkpoint_count<= br>+ | =C2=A0 =C2=A0 - 2
+ | =C2=A0 - - checkpoint_interval
+ | =C2= =A0 =C2=A0 - 3600
+ | =C2=A0 - - checkpoint_wal_threshold
+ | =C2=A0 = =C2=A0 - 1000000000000000000
+ | =C2=A0 - - coredump
+ | =C2=A0 =C2= =A0 - false
+ | =C2=A0 - - feedback_enabled
+ | =C2=A0 =C2=A0 - true<= br>+ | =C2=A0 - - feedback_host
+ | =C2=A0 =C2=A0 - https://feedback.tarantool.io
+ | =C2=A0 - - f= eedback_interval
+ | =C2=A0 =C2=A0 - 3600
+ | =C2=A0 - - force_recove= ry
+ | =C2=A0 =C2=A0 - false
+ | =C2=A0 - - hot_standby
+ | =C2=A0= =C2=A0 - false
+ | =C2=A0 - - listen
+ | =C2=A0 =C2=A0 - <hidden&= gt;
+ | =C2=A0 - - log
+ | =C2=A0 =C2=A0 - <hidden>
+ | =C2= =A0 - - log_format
+ | =C2=A0 =C2=A0 - plain
+ | =C2=A0 - - log_level=
+ | =C2=A0 =C2=A0 - 5
+ | =C2=A0 - - memtx_dir
+ | =C2=A0 =C2=A0 = - <hidden>
+ | =C2=A0 - - memtx_max_tuple_size
+ | =C2=A0 =C2= =A0 - <hidden>
+ | =C2=A0 - - memtx_memory
+ | =C2=A0 =C2=A0 - = 107374182
+ | =C2=A0 - - memtx_min_tuple_size
+ | =C2=A0 =C2=A0 - <= ;hidden>
+ | =C2=A0 - - net_msg_max
+ | =C2=A0 =C2=A0 - 768
+ |= =C2=A0 - - pid_file
+ | =C2=A0 =C2=A0 - <hidden>
+ | =C2=A0 - = - read_only
+ | =C2=A0 =C2=A0 - false
+ | =C2=A0 - - readahead
+ |= =C2=A0 =C2=A0 - 16320
+ | =C2=A0 - - replication_connect_timeout
+ |= =C2=A0 =C2=A0 - 30
+ | =C2=A0 - - replication_skip_conflict
+ | =C2= =A0 =C2=A0 - false
+ | =C2=A0 - - replication_sync_lag
+ | =C2=A0 =C2= =A0 - 10
+ | =C2=A0 - - replication_sync_timeout
+ | =C2=A0 =C2=A0 - = 300
+ | =C2=A0 - - replication_timeout
+ | =C2=A0 =C2=A0 - 1
+ | = =C2=A0 - - rows_per_wal
+ | =C2=A0 =C2=A0 - 500000
+ | =C2=A0 - - sla= b_alloc_factor
+ | =C2=A0 =C2=A0 - 1.05
+ | =C2=A0 - - strip_core
= + | =C2=A0 =C2=A0 - true
+ | =C2=A0 - - too_long_threshold
+ | =C2=A0= =C2=A0 - 0.5
+ | =C2=A0 - - vinyl_bloom_fpr
+ | =C2=A0 =C2=A0 - 0.05=
+ | =C2=A0 - - vinyl_cache
+ | =C2=A0 =C2=A0 - 134217728
+ | =C2= =A0 - - vinyl_dir
+ | =C2=A0 =C2=A0 - <hidden>
+ | =C2=A0 - - v= inyl_max_tuple_size
+ | =C2=A0 =C2=A0 - 1048576
+ | =C2=A0 - - vinyl_= memory
+ | =C2=A0 =C2=A0 - 134217728
+ | =C2=A0 - - vinyl_page_size+ | =C2=A0 =C2=A0 - 8192
+ | =C2=A0 - - vinyl_read_threads
+ | =C2= =A0 =C2=A0 - 1
+ | =C2=A0 - - vinyl_run_count_per_level
+ | =C2=A0 = =C2=A0 - 2
+ | =C2=A0 - - vinyl_run_size_ratio
+ | =C2=A0 =C2=A0 - 3.= 5
+ | =C2=A0 - - vinyl_timeout
+ | =C2=A0 =C2=A0 - 60
+ | =C2=A0 -= - vinyl_write_threads
+ | =C2=A0 =C2=A0 - 4
+ | =C2=A0 - - wal_dir+ | =C2=A0 =C2=A0 - <hidden>
+ | =C2=A0 - - wal_dir_rescan_delay=
+ | =C2=A0 =C2=A0 - 2
+ | =C2=A0 - - wal_max_size
+ | =C2=A0 =C2= =A0 - 268435456
+ | =C2=A0 - - wal_mode
+ | =C2=A0 =C2=A0 - write
= + | =C2=A0 - - worker_pool_threads
+ | =C2=A0 =C2=A0 - 4
+ | ...
+=
=C2=A0-- check that cfg with unexpected parameter fails.
=C2=A0box.c= fg{sherlock =3D 'holmes'}
----
-- error: 'Incorrect value= for option ''sherlock'': unexpected option'
-...+ | ---
+ | - error: 'Incorrect value for option ''sherlock= '': unexpected option'
+ | ...
+
=C2=A0-- check that c= fg with unexpected type of parameter fails
=C2=A0box.cfg{listen =3D {}}<= br>----
-- error: 'Incorrect value for option ''listen'&= #39;: should be one of types string, number'
-...
+ | ---
+ | = - error: 'Incorrect value for option ''listen'': should= be one of types string, number'
+ | ...
=C2=A0box.cfg{wal_dir = =3D 0}
----
-- error: 'Incorrect value for option ''wal_d= ir'': should be of type string'
-...
+ | ---
+ | - err= or: 'Incorrect value for option ''wal_dir'': should be = of type string'
+ | ...
=C2=A0box.cfg{coredump =3D 'true'= }
----
-- error: 'Incorrect value for option ''coredump&#= 39;': should be of type boolean'
-...
+ | ---
+ | - error:= 'Incorrect value for option ''coredump'': should be of= type boolean'
+ | ...
+
=C2=A0-- check comment to issue #2191= - bad argument #2 to ''uri_parse''
=C2=A0box.cfg{replic= ation =3D {}}
----
-...
+ | ---
+ | ...
=C2=A0box.cfg{replic= ation =3D {}}
----
-...
+ | ---
+ | ...
+
=C2=A0---------= -----------------------------------------------------------------------
= =C2=A0-- Test of hierarchical cfg type check
=C2=A0---------------------= -----------------------------------------------------------
+
=C2=A0b= ox.cfg{memtx_memory =3D "100500"}
----
-- error: 'Incor= rect value for option ''memtx_memory'': should be of type n= umber'
-...
+ | ---
+ | - error: 'Incorrect value for opti= on ''memtx_memory'': should be of type number'
+ | .= ..
=C2=A0box.cfg{memtx_memory =3D -1}
----
-- error: 'Incorrec= t value for option ''memtx_memory'': must not be less than = 0'
-...
+ | ---
+ | - error: 'Incorrect value for option &= #39;'memtx_memory'': must not be less than 0'
+ | ...=C2=A0box.cfg{vinyl_memory =3D -1}
----
-- error: 'Incorrect val= ue for option ''vinyl_memory'': must not be less than 0'= ;
-...
+ | ---
+ | - error: 'Incorrect value for option '&= #39;vinyl_memory'': must not be less than 0'
+ | ...
=C2= =A0box.cfg{vinyl =3D "vinyl"}
----
-- error: 'Incorrect= value for option ''vinyl'': unexpected option'
-...=
+ | ---
+ | - error: 'Incorrect value for option ''vinyl= '': unexpected option'
+ | ...
=C2=A0box.cfg{vinyl_write_= threads =3D "threads"}
----
-- error: 'Incorrect value = for option ''vinyl_write_threads'': should be of type numbe= r'
-...
+ | ---
+ | - error: 'Incorrect value for option &= #39;'vinyl_write_threads'': should be of type number'
+ = | ...
+
=C2=A0-------------------------------------------------------= -------------------------
=C2=A0-- Dynamic configuration check
=C2=A0= ---------------------------------------------------------------------------= -----
+
=C2=A0replication_sync_lag =3D box.cfg.replication_sync_lag----
-...
+ | ---
+ | ...
=C2=A0box.cfg{replication_sync_lag = =3D 0.123}
----
-...
+ | ---
+ | ...
=C2=A0box.cfg.replicati= on_sync_lag
----
-- 0.123
-...
+ | ---
+ | - 0.123
+ | ..= .
=C2=A0box.cfg{replication_sync_lag =3D replication_sync_lag}
-----...
+ | ---
+ | ...
+
=C2=A0replication_sync_timeout =3D box= .cfg.replication_sync_timeout
----
-...
+ | ---
+ | ...
=C2= =A0box.cfg{replication_sync_timeout =3D 123}
----
-...
+ | ---
= + | ...
=C2=A0box.cfg.replication_sync_timeout
----
-- 123
-...=
+ | ---
+ | - 123
+ | ...
=C2=A0box.cfg{replication_sync_timeo= ut =3D replication_sync_timeout}
----
-...
+ | ---
+ | ...
+=
=C2=A0box.cfg{instance_uuid =3D box.info.uuid}
----
-...
+ | -= --
+ | ...
=C2=A0box.cfg{instance_uuid =3D '12345678-0123-5678-12= 34-abcdefabcdef'}
----
-- error: Can't set option 'instan= ce_uuid' dynamically
-...
+ | ---
+ | - error: Can't set o= ption 'instance_uuid' dynamically
+ | ...
+
=C2=A0box.cfg{= replicaset_uuid =3D box.info.cluster.uuid}
----
-...
+ | ---
+ = | ...
=C2=A0box.cfg{replicaset_uuid =3D '12345678-0123-5678-1234-abc= defabcdef'}
----
-- error: Can't set option 'replicaset_u= uid' dynamically
-...
+ | ---
+ | - error: Can't set optio= n 'replicaset_uuid' dynamically
+ | ...
+
=C2=A0box.cfg{me= mtx_memory =3D box.cfg.memtx_memory}
----
-...
+ | ---
+ | ...<= br>=C2=A0box.cfg{vinyl_memory =3D box.cfg.vinyl_memory}
----
-...
= + | ---
+ | ...
+
=C2=A0------------------------------------------= --------------------------------------
=C2=A0-- Test of default cfg opti= ons
=C2=A0--------------------------------------------------------------= ------------------
+
=C2=A0test_run:cmd('create server cfg_tester= 1 with script =3D "box/lua/cfg_test1.lua"')
----
-- tru= e
-...
+ | ---
+ | - true
+ | ...
=C2=A0test_run:cmd("s= tart server cfg_tester1")
----
-- true
-...
+ | ---
+ |= - true
+ | ...
=C2=A0test_run:cmd('switch cfg_tester1')
-= ---
-- true
-...
+ | ---
+ | - true
+ | ...
=C2=A0box.cfg= .memtx_memory, box.cfg.slab_alloc_factor, box.cfg.vinyl_write_threads
--= --
-- 268435456
-- 1.05
-- 4
-...
+ | ---
+ | - 268435456=
+ | - 1.05
+ | - 4
+ | ...
=C2=A0test_run:cmd("switch def= ault")
----
-- true
-...
+ | ---
+ | - true
+ | ...<= br>=C2=A0test_run:cmd("stop server cfg_tester1")
----
-- tr= ue
-...
+ | ---
+ | - true
+ | ...
=C2=A0test_run:cmd("= cleanup server cfg_tester1")
----
-- true
-...
+ | ---
= + | - true
+ | ...
+
=C2=A0test_run:cmd('create server cfg_tes= ter2 with script =3D "box/lua/cfg_test2.lua"')
----
-- = true
-...
+ | ---
+ | - true
+ | ...
=C2=A0test_run:cmd(&quo= t;start server cfg_tester2")
----
-- true
-...
+ | ---
= + | - true
+ | ...
=C2=A0test_run:cmd('switch cfg_tester2')----
-- true
-...
+ | ---
+ | - true
+ | ...
=C2=A0box.= cfg.memtx_memory, box.cfg.slab_alloc_factor, box.cfg.vinyl_write_threads----
-- 214748364
-- 1.05
-- 4
-...
+ | ---
+ | - 214748= 364
+ | - 1.05
+ | - 4
+ | ...
=C2=A0test_run:cmd("switch = default")
----
-- true
-...
+ | ---
+ | - true
+ | .= ..
=C2=A0test_run:cmd("stop server cfg_tester2")
----
--= true
-...
+ | ---
+ | - true
+ | ...
=C2=A0test_run:cmd(&qu= ot;cleanup server cfg_tester2")
----
-- true
-...
+ | ---<= br>+ | - true
+ | ...
+
=C2=A0test_run:cmd('create server cfg_= tester3 with script =3D "box/lua/cfg_test3.lua"')
----
= -- true
-...
+ | ---
+ | - true
+ | ...
=C2=A0test_run:cmd(&= quot;start server cfg_tester3")
----
-- true
-...
+ | ---<= br>+ | - true
+ | ...
=C2=A0test_run:cmd('switch cfg_tester3'= )
----
-- true
-...
+ | ---
+ | - true
+ | ...
=C2=A0b= ox.cfg.memtx_memory, box.cfg.slab_alloc_factor, box.cfg.vinyl_write_threads=
----
-- 214748364
-- 1.05
-- 10
-...
+ | ---
+ | - 21= 4748364
+ | - 1.05
+ | - 10
+ | ...
=C2=A0test_run:cmd("sw= itch default")
----
-- true
-...
+ | ---
+ | - true
= + | ...
=C2=A0test_run:cmd("stop server cfg_tester3")
----<= br>-- true
-...
+ | ---
+ | - true
+ | ...
=C2=A0test_run:cm= d("cleanup server cfg_tester3")
----
-- true
-...
+ |= ---
+ | - true
+ | ...
+
=C2=A0test_run:cmd('create server= cfg_tester4 with script =3D "box/lua/cfg_test4.lua"')
---= -
-- true
-...
+ | ---
+ | - true
+ | ...
=C2=A0test_run:= cmd("start server cfg_tester4")
----
-- true
-...
+ |= ---
+ | - true
+ | ...
=C2=A0test_run:cmd('switch cfg_tester4= ')
----
-- true
-...
+ | ---
+ | - true
+ | ...
= =C2=A0box.cfg.memtx_memory, box.cfg.slab_alloc_factor, box.cfg.vinyl_write_= threads
----
-- 268435456
-- 3.14
-- 4
-...
+ | ---
+ = | - 268435456
+ | - 3.14
+ | - 4
+ | ...
=C2=A0test_run:cmd(&qu= ot;switch default")
----
-- true
-...
+ | ---
+ | - tru= e
+ | ...
=C2=A0test_run:cmd("stop server cfg_tester4")
= ----
-- true
-...
+ | ---
+ | - true
+ | ...
=C2=A0test_r= un:cmd("cleanup server cfg_tester4")
----
-- true
-...+ | ---
+ | - true
+ | ...
+
=C2=A0--------------------------= ------------------------------------------------------
=C2=A0-- Check fi= x for pid_file option overwritten by tarantoolctl
=C2=A0----------------= ----------------------------------------------------------------
+
= =C2=A0test_run:cmd('create server cfg_tester5 with script =3D "box= /lua/cfg_test1.lua"')
----
-- true
-...
+ | ---
+ |= - true
+ | ...
=C2=A0test_run:cmd("start server cfg_tester5&quo= t;)
----
-- true
-...
+ | ---
+ | - true
+ | ...
=C2= =A0test_run:cmd('switch cfg_tester5')
----
-- true
-...+ | ---
+ | - true
+ | ...
=C2=A0box.cfg{pid_file =3D "curre= nt.pid"}
----
-...
+ | ---
+ | ...
=C2=A0test_run:cmd(&= quot;switch default")
----
-- true
-...
+ | ---
+ | - t= rue
+ | ...
=C2=A0test_run:cmd("stop server cfg_tester5")----
-- true
-...
+ | ---
+ | - true
+ | ...
=C2=A0test= _run:cmd("cleanup server cfg_tester5")
----
-- true
-...=
+ | ---
+ | - true
+ | ...
+
=C2=A0------------------------= --------------------------------------------------------
=C2=A0-- Check = that 'vinyl_dir' cfg option is not checked as long as
=C2=A0-- t= here is no vinyl indexes (issue #2664)
=C2=A0---------------------------= -----------------------------------------------------
+
=C2=A0test_ru= n:cmd('create server cfg_tester with script =3D "box/lua/cfg_bad_v= inyl_dir.lua"')
----
-- true
-...
+ | ---
+ | - tru= e
+ | ...
=C2=A0test_run:cmd("start server cfg_tester")
= ----
-- true
-...
+ | ---
+ | - true
+ | ...
=C2=A0test_r= un:cmd('switch cfg_tester')
----
-- true
-...
+ | ---+ | - true
+ | ...
=C2=A0_ =3D box.schema.space.create('test_me= mtx', {engine =3D 'memtx'})
----
-...
+ | ---
+ | .= ..
=C2=A0_ =3D box.space.test_memtx:create_index('pk') -- ok
= ----
-...
+ | ---
+ | ...
=C2=A0_ =3D box.schema.space.create(&= #39;test_vinyl', {engine =3D 'vinyl'})
----
-...
+ | -= --
+ | ...
=C2=A0_ =3D box.space.test_vinyl:create_index('pk'= ) -- error
----
-- error: can not access vinyl data directory
-...=
+ | ---
+ | - error: can not access vinyl data directory
+ | ...<= br>=C2=A0box.snapshot()
----
-- ok
-...
+ | ---
+ | - ok
= + | ...
=C2=A0test_run:cmd("restart server cfg_tester")
+ |=
=C2=A0test_run:cmd("switch default")
----
-- true
-= ...
+ | ---
+ | - true
+ | ...
=C2=A0test_run:cmd("stop se= rver cfg_tester")
----
-- true
-...
+ | ---
+ | - true<= br>+ | ...
=C2=A0test_run:cmd("cleanup server cfg_tester")
= ----
-- true
-...
+ | ---
+ | - true
+ | ...
+
=C2=A0-= -
=C2=A0-- gh-3320: box.cfg{net_msg_max}.
=C2=A0--
=C2=A0box.cfg{n= et_msg_max =3D 'invalid'}
----
-- error: 'Incorrect value= for option ''net_msg_max'': should be of type number'<= br>-...
+ | ---
+ | - error: 'Incorrect value for option '= 9;net_msg_max'': should be of type number'
+ | ...
=C2=A0= --
=C2=A0-- gh-3425: incorrect error message: must not contain 'ipro= to'.
=C2=A0--
=C2=A0box.cfg{net_msg_max =3D 0}
----
-- erro= r: 'Incorrect value for option ''net_msg_max'': minimal= value is 2'
-...
+ | ---
+ | - error: 'Incorrect value fo= r option ''net_msg_max'': minimal value is 2'
+ | ..= .
=C2=A0old =3D box.cfg.net_msg_max
----
-...
+ | ---
+ | ..= .
=C2=A0box.cfg{net_msg_max =3D 2}
----
-...
+ | ---
+ | ...=
=C2=A0box.cfg{net_msg_max =3D old + 1000}
----
-...
+ | ---+ | ...
=C2=A0box.cfg{net_msg_max =3D old}
----
-...
+ | ---+ | ...
+
=C2=A0test_run:cmd("clear filter")
----
-= - true
-...
+ | ---
+ | - true
+ | ...
+
+--
+-- gh-42= 36: initial box.cfg{} call did not log changes to default state
+--
+= test_run:cmd('create server cfg_tester6 with script =3D "box/lua/c= fg_test5.lua"')
+ | ---
+ | - true
+ | ...
+test_run:c= md("start server cfg_tester6")
+ | ---
+ | - true
+ | ..= .
+test_run:grep_log('cfg_tester6', 'set \'vinyl_memory\= ' configuration option to 1073741824', 1000)
+ | ---
+ | - se= t 'vinyl_memory' configuration option to 1073741824
+ | ...
+= test_run:cmd("stop server cfg_tester6")
+ | ---
+ | - true<= br>+ | ...
+test_run:cmd("cleanup server cfg_tester6")
+ | = ---
+ | - true
+ | ...
diff --git a/test/box/cfg.test.lua b/test/b= ox/cfg.test.lua
index eddeab126..56ccb6767 100644
--- a/test/box/cfg.= test.lua
+++ b/test/box/cfg.test.lua
@@ -132,3 +132,12 @@ box.cfg{net= _msg_max =3D old + 1000}
=C2=A0box.cfg{net_msg_max =3D old}
=C2=A0=C2=A0test_run:cmd("clear filter")
+
+--
+-- gh-4236: i= nitial box.cfg{} call did not log changes to default state
+--
+test_= run:cmd('create server cfg_tester6 with script =3D "box/lua/cfg_te= st5.lua"')
+test_run:cmd("start server cfg_tester6")<= br>+test_run:grep_log('cfg_tester6', 'set \'vinyl_memory\&#= 39; configuration option to 1073741824', 1000)
+test_run:cmd("s= top server cfg_tester6")
+test_run:cmd("cleanup server cfg_tes= ter6")
diff --git a/test/box/lua/cfg_test5.lua b/test/box/lua/cfg_t= est5.lua
new file mode 100644
index 000000000..e3eb87392
--- /dev/= null
+++ b/test/box/lua/cfg_test5.lua
@@ -0,0 +1,10 @@
+#!/usr/bin= /env tarantool
+os =3D require('os')
+
+box.cfg{
+ =C2= =A0 =C2=A0listen =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=3D os.get= env("LISTEN"),
+ =C2=A0 =C2=A0vinyl_memory =3D 1024 * 1024 * 1= 024
+}
+
+require('console').listen(os.getenv('ADMIN&#= 39;))
+box.schema.user.grant('guest', 'read,write,execute= 9;, 'universe')
\ No newline at end of file
--
2.21.0
=
--0000000000005101a5058e419040--