File: cfg.result

package info (click to toggle)
tarantool 2.6.0-1.4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 85,412 kB
  • sloc: ansic: 513,775; cpp: 69,493; sh: 25,650; python: 19,190; perl: 14,973; makefile: 4,178; yacc: 1,329; sql: 1,074; pascal: 620; ruby: 190; awk: 18; lisp: 7
file content (646 lines) | stat: -rw-r--r-- 13,757 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
-- 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:<line>: '")
 | ---
 | - true
 | ...
box.cfg.nosuchoption = 1
 | ---
 | - error: 'builtin/box/load_cfg.lua:<line>: 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
 |     - <hidden>
 |   - - log
 |     - <hidden>
 |   - - log_format
 |     - plain
 |   - - log_level
 |     - 5
 |   - - memtx_dir
 |     - <hidden>
 |   - - memtx_max_tuple_size
 |     - <hidden>
 |   - - memtx_memory
 |     - 107374182
 |   - - memtx_min_tuple_size
 |     - <hidden>
 |   - - net_msg_max
 |     - 768
 |   - - pid_file
 |     - <hidden>
 |   - - read_only
 |     - false
 |   - - readahead
 |     - 16320
 |   - - replication_anon
 |     - false
 |   - - replication_connect_timeout
 |     - 30
 |   - - replication_skip_conflict
 |     - false
 |   - - replication_sync_lag
 |     - 10
 |   - - replication_sync_timeout
 |     - 300
 |   - - replication_synchro_quorum
 |     - 1
 |   - - replication_synchro_timeout
 |     - 5
 |   - - replication_timeout
 |     - 1
 |   - - slab_alloc_factor
 |     - 1.05
 |   - - sql_cache_size
 |     - 5242880
 |   - - strip_core
 |     - true
 |   - - too_long_threshold
 |     - 0.5
 |   - - vinyl_bloom_fpr
 |     - 0.05
 |   - - vinyl_cache
 |     - 134217728
 |   - - vinyl_dir
 |     - <hidden>
 |   - - 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
 |     - <hidden>
 |   - - 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
 |     - <hidden>
 |   - - log
 |     - <hidden>
 |   - - log_format
 |     - plain
 |   - - log_level
 |     - 5
 |   - - memtx_dir
 |     - <hidden>
 |   - - memtx_max_tuple_size
 |     - <hidden>
 |   - - memtx_memory
 |     - 107374182
 |   - - memtx_min_tuple_size
 |     - <hidden>
 |   - - net_msg_max
 |     - 768
 |   - - pid_file
 |     - <hidden>
 |   - - read_only
 |     - false
 |   - - readahead
 |     - 16320
 |   - - replication_anon
 |     - false
 |   - - replication_connect_timeout
 |     - 30
 |   - - replication_skip_conflict
 |     - false
 |   - - replication_sync_lag
 |     - 10
 |   - - replication_sync_timeout
 |     - 300
 |   - - replication_synchro_quorum
 |     - 1
 |   - - replication_synchro_timeout
 |     - 5
 |   - - replication_timeout
 |     - 1
 |   - - slab_alloc_factor
 |     - 1.05
 |   - - sql_cache_size
 |     - 5242880
 |   - - strip_core
 |     - true
 |   - - too_long_threshold
 |     - 0.5
 |   - - vinyl_bloom_fpr
 |     - 0.05
 |   - - vinyl_cache
 |     - 134217728
 |   - - vinyl_dir
 |     - <hidden>
 |   - - 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
 |     - <hidden>
 |   - - 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'
 | ...

-- 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'
 | ...
box.cfg{wal_dir = 0}
 | ---
 | - 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'
 | ...

-- 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'
 | ...
box.cfg{memtx_memory = -1}
 | ---
 | - error: 'Incorrect value for option ''memtx_memory'': must be >= 0 and <= 4398046510080,
 |     but it is -1'
 | ...
box.cfg{vinyl_memory = -1}
 | ---
 | - error: 'Incorrect value for option ''vinyl_memory'': must be >= 0 and <= 4398046510080,
 |     but it is -1'
 | ...
box.cfg{vinyl = "vinyl"}
 | ---
 | - 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'
 | ...
--
-- gh-4705: too big memory size led to an assertion.
--
box.cfg{memtx_memory = 5000000000000}
 | ---
 | - error: 'Incorrect value for option ''memtx_memory'': must be >= 0 and <= 4398046510080,
 |     but it is 5000000000000'
 | ...
box.cfg{vinyl_memory = 5000000000000}
 | ---
 | - error: 'Incorrect value for option ''vinyl_memory'': must be >= 0 and <= 4398046510080,
 |     but it is 5000000000000'
 | ...

--------------------------------------------------------------------------------
-- 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
 | ...
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
 | ...
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
 | ...

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
 | ...

box.cfg{memtx_memory = box.cfg.memtx_memory}
 | ---
 | ...
box.cfg{vinyl_memory = box.cfg.vinyl_memory}
 | ---
 | ...
box.cfg{sql_cache_size = box.cfg.sql_cache_size}
 | ---
 | ...

--------------------------------------------------------------------------------
-- Test of default cfg options
--------------------------------------------------------------------------------

test_run:cmd('create server cfg_tester1 with script = "box/lua/cfg_test1.lua"')
 | ---
 | - true
 | ...
test_run:cmd("start server cfg_tester1")
 | ---
 | - true
 | ...
test_run:cmd('switch cfg_tester1')
 | ---
 | - true
 | ...
box.cfg.memtx_memory, box.cfg.slab_alloc_factor, box.cfg.vinyl_write_threads
 | ---
 | - 268435456
 | - 1.05
 | - 4
 | ...
test_run:cmd("switch default")
 | ---
 | - true
 | ...
test_run:cmd("stop server cfg_tester1")
 | ---
 | - true
 | ...
test_run:cmd("cleanup server cfg_tester1")
 | ---
 | - true
 | ...

test_run:cmd('create server cfg_tester2 with script = "box/lua/cfg_test2.lua"')
 | ---
 | - true
 | ...
test_run:cmd("start server cfg_tester2")
 | ---
 | - true
 | ...
test_run:cmd('switch cfg_tester2')
 | ---
 | - true
 | ...
box.cfg.memtx_memory, box.cfg.slab_alloc_factor, box.cfg.vinyl_write_threads
 | ---
 | - 214748364
 | - 1.05
 | - 4
 | ...
test_run:cmd("switch default")
 | ---
 | - true
 | ...
test_run:cmd("stop server cfg_tester2")
 | ---
 | - true
 | ...
test_run:cmd("cleanup server cfg_tester2")
 | ---
 | - true
 | ...

test_run:cmd('create server cfg_tester3 with script = "box/lua/cfg_test3.lua"')
 | ---
 | - true
 | ...
test_run:cmd("start server cfg_tester3")
 | ---
 | - true
 | ...
test_run:cmd('switch cfg_tester3')
 | ---
 | - true
 | ...
box.cfg.memtx_memory, box.cfg.slab_alloc_factor, box.cfg.vinyl_write_threads
 | ---
 | - 214748364
 | - 1.05
 | - 10
 | ...
test_run:cmd("switch default")
 | ---
 | - true
 | ...
test_run:cmd("stop server cfg_tester3")
 | ---
 | - true
 | ...
test_run:cmd("cleanup server cfg_tester3")
 | ---
 | - true
 | ...

test_run:cmd('create server cfg_tester4 with script = "box/lua/cfg_test4.lua"')
 | ---
 | - true
 | ...
test_run:cmd("start server cfg_tester4")
 | ---
 | - true
 | ...
test_run:cmd('switch cfg_tester4')
 | ---
 | - true
 | ...
box.cfg.memtx_memory, box.cfg.slab_alloc_factor, box.cfg.vinyl_write_threads
 | ---
 | - 268435456
 | - 3.14
 | - 4
 | ...
test_run:cmd("switch default")
 | ---
 | - true
 | ...
test_run:cmd("stop server cfg_tester4")
 | ---
 | - true
 | ...
test_run:cmd("cleanup server cfg_tester4")
 | ---
 | - 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
 | ...
test_run:cmd("start server cfg_tester5")
 | ---
 | - true
 | ...
test_run:cmd('switch cfg_tester5')
 | ---
 | - true
 | ...
box.cfg{pid_file = "current.pid"}
 | ---
 | ...
test_run:cmd("switch default")
 | ---
 | - true
 | ...
test_run:cmd("stop server cfg_tester5")
 | ---
 | - true
 | ...
test_run:cmd("cleanup server cfg_tester5")
 | ---
 | - 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
 | ...
test_run:cmd("start server cfg_tester")
 | ---
 | - true
 | ...
test_run:cmd('switch cfg_tester')
 | ---
 | - 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
 | ...
box.snapshot()
 | ---
 | - ok
 | ...
test_run:cmd("restart server cfg_tester")
 | 
test_run:cmd("switch default")
 | ---
 | - true
 | ...
test_run:cmd("stop server cfg_tester")
 | ---
 | - true
 | ...
test_run:cmd("cleanup server cfg_tester")
 | ---
 | - 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'
 | ...
--
-- 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'
 | ...
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
 | ...

--
-- 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
 | ...

--
-- gh-4493: Replication user password may leak to logs
--
test_run:cmd('create server cfg_tester7 with script = "box/lua/cfg_test6.lua"')
 | ---
 | - true
 | ...
test_run:cmd("start server cfg_tester7")
 | ---
 | - true
 | ...
-- test there is replication log in log
test_run:grep_log('cfg_tester7', 'set \'replication\' configuration option to', 1000)
 | ---
 | - set 'replication' configuration option to
 | ...
-- test there is no password in log
test_run:grep_log('cfg_tester7', 'test%-cluster%-cookie', 1000)
 | ---
 | - null
 | ...
test_run:cmd("stop server cfg_tester7")
 | ---
 | - true
 | ...
test_run:cmd("cleanup server cfg_tester7")
 | ---
 | - true
 | ...