Skip to content

Commit d27cd01

Browse files
authored
Config reference for console and process (#4240)
* Add/update reference for console and process config sections * Undeprecate coredump parameter in box.cfg config
1 parent 2149727 commit d27cd01

File tree

3 files changed

+147
-20
lines changed

3 files changed

+147
-20
lines changed

doc/reference/configuration/cfg_basic.rst

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
* :ref:`background <cfg_basic-background>`
2+
* :ref:`coredump <cfg_basic-coredump>`
23
* :ref:`custom_proc_title <cfg_basic-custom_proc_title>`
34
* :ref:`listen <cfg_basic-listen>`
45
* :ref:`memtx_dir <cfg_basic-memtx_dir>`
@@ -35,6 +36,31 @@
3536
| Environment variable: TT_BACKGROUND
3637
| Dynamic: no
3738
39+
.. _cfg_basic-coredump:
40+
41+
.. confval:: coredump
42+
43+
Create coredump files.
44+
45+
Usually, an administrator needs to call ``ulimit -c unlimited``
46+
(or set corresponding options in systemd's unit file)
47+
before running a Tarantool process to get core dumps.
48+
If ``coredump`` is enabled, Tarantool sets the corresponding
49+
resource limit by itself
50+
and the administrator doesn't need to call ``ulimit -c unlimited``
51+
(see `man 3 setrlimit <https://man7.org/linux/man-pages/man3/setrlimit.3p.html>`_).
52+
53+
This option also sets the state of the ``dumpable`` attribute,
54+
which is enabled by default,
55+
but may be dropped in some circumstances (according to
56+
`man 2 prctl <https://man7.org/linux/man-pages/man2/prctl.2.html>`_, see PR_SET_DUMPABLE).
57+
58+
|
59+
| Type: boolean
60+
| Environment variable: TT_COREDUMP
61+
| Default: false
62+
| Dynamic: no
63+
3864
.. _cfg_basic-custom_proc_title:
3965

4066
.. confval:: custom_proc_title

doc/reference/configuration/cfg_deprecated.rst

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
These parameters are deprecated since Tarantool version 1.7.4:
44

5-
* :ref:`coredump <cfg_basic-coredump_deprecated>`
65
* :ref:`logger <cfg_logging-logger_deprecated>`
76
* :ref:`logger_nonblock <cfg_logging-logger_nonblock_deprecated>`
87
* :ref:`panic_on_snap_error <cfg_binary_logging_snapshots-panic_on_snap_error_deprecated>`,
@@ -17,17 +16,6 @@ These parameters are deprecated since Tarantool version 1.7.4:
1716
* :ref:`rows_per_wal <cfg_binary_logging_snapshots-rows_per_wal>`
1817
* :ref:`election_fencing_enabled <cfg_election-election_fencing_enabled_deprecated>`
1918

20-
.. _cfg_basic-coredump_deprecated:
21-
22-
.. confval:: coredump
23-
24-
**Deprecated**, do not use.
25-
26-
|
27-
| Type: boolean
28-
| Default: false
29-
| Dynamic: no
30-
3119
.. _cfg_logging-logger_deprecated:
3220

3321
.. confval:: logger

doc/reference/configuration/configuration_reference.rst

Lines changed: 121 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -730,8 +730,55 @@ This section describes options related to providing connection settings to a :re
730730
| Default: 3
731731
| Environment variable: TT_CONFIG_STORAGE_TIMEOUT
732732
733+
.. _configuration_reference_console:
733734

735+
console
736+
-------
737+
738+
Configure the administrative console. A client to the console is ``tt connect``.
739+
740+
.. NOTE::
741+
742+
``console`` can be defined in any :ref:`scope <configuration_scopes>`.
743+
744+
* :ref:`console.enabled <configuration_reference_console_enabled>`
745+
* :ref:`console.socket <configuration_reference_console_socket>`
746+
747+
.. _configuration_reference_console_enabled:
734748

749+
.. confval:: console.enabled
750+
751+
**Since:** :doc:`3.0.0 </release/3.0.0>`.
752+
753+
Whether to listen on the Unix socket provided in the
754+
:ref:`console.socket <configuration_reference_console_socket>` option.
755+
756+
If the option is set to ``false``, the administrative console is disabled.
757+
758+
|
759+
| Type: boolean
760+
| Default: true
761+
| Environment variable: TT_CONSOLE_ENABLED
762+
763+
.. _configuration_reference_console_socket:
764+
765+
.. confval:: console.socket
766+
767+
**Since:** :doc:`3.0.0 </release/3.0.0>`.
768+
769+
The Unix socket for the administrative console.
770+
771+
Mind the following nuances:
772+
773+
* Only a Unix domain socket is allowed. A TCP socket can't be configured this way.
774+
* ``console.socket`` is a file path, without any ``unix:`` or ``unix/:`` prefixes.
775+
* If the file path is a relative path, it is interpreted relative to
776+
:ref:`process.work_dir <configuration_reference_process_work_dir>`.
777+
778+
|
779+
| Type: string
780+
| Default: 'var/run/{{ instance_name }}/tarantool.control'
781+
| Environment variable: TT_CONSOLE_SOCKET
735782
736783
.. _configuration_reference_credentials:
737784

@@ -2385,8 +2432,11 @@ The ``memtx`` section is used to configure parameters related to the :ref:`memtx
23852432
process
23862433
-------
23872434

2388-
The ``process`` defines configuration parameters of the Tarantool process in the system.
2435+
The ``process`` section defines configuration parameters of the Tarantool process in the system.
2436+
2437+
.. NOTE::
23892438

2439+
``process`` can be defined in any :ref:`scope <configuration_scopes>`.
23902440

23912441
- :ref:`process.background <configuration_reference_process_background>`
23922442
- :ref:`process.coredump <configuration_reference_process_coredump>`
@@ -2400,7 +2450,15 @@ The ``process`` defines configuration parameters of the Tarantool process in the
24002450

24012451
.. confval:: process.background
24022452

2403-
Run the server as a background task.
2453+
**Since:** :doc:`3.0.0 </release/3.0.0>`.
2454+
2455+
Run the server as a daemon process.
2456+
2457+
If this option is set to ``true``, Tarantool log location defined by the
2458+
:ref:`log.to <configuration_reference_log_to>` option should be set to
2459+
``file``, ``pipe``, or ``syslog`` -- anything other than ``stderr``,
2460+
the default, because a daemon process is detached from a terminal
2461+
and it can't write to the terminal's stderr.
24042462

24052463
.. important::
24062464

@@ -2412,11 +2470,26 @@ The ``process`` defines configuration parameters of the Tarantool process in the
24122470
| Default: false
24132471
| Environment variable: TT_PROCESS_BACKGROUND
24142472
2415-
24162473
.. _configuration_reference_process_coredump:
24172474

24182475
.. confval:: process.coredump
24192476

2477+
**Since:** :doc:`3.0.0 </release/3.0.0>`.
2478+
2479+
Create coredump files.
2480+
2481+
Usually, an administrator needs to call ``ulimit -c unlimited``
2482+
(or set corresponding options in systemd's unit file)
2483+
before running a Tarantool process to get core dumps.
2484+
If ``process.coredump`` is enabled, Tarantool sets the corresponding
2485+
resource limit by itself
2486+
and the administrator doesn't need to call ``ulimit -c unlimited``
2487+
(see `man 3 setrlimit <https://man7.org/linux/man-pages/man3/setrlimit.3p.html>`_).
2488+
2489+
This option also sets the state of the ``dumpable`` attribute,
2490+
which is enabled by default,
2491+
but may be dropped in some circumstances (according to
2492+
`man 2 prctl <https://man7.org/linux/man-pages/man2/prctl.2.html>`_, see PR_SET_DUMPABLE).
24202493

24212494
|
24222495
| Type: boolean
@@ -2427,9 +2500,25 @@ The ``process`` defines configuration parameters of the Tarantool process in the
24272500

24282501
.. confval:: process.title
24292502

2430-
Sets the name of the server's process title (what’s shown in the COMMAND column for
2431-
``ps -ef`` and ``top -c`` commands).
2503+
**Since:** :doc:`3.0.0 </release/3.0.0>`.
2504+
2505+
Add the given string to the server's process title
2506+
(it is shown in the COMMAND column for the Linux commands
2507+
``ps -ef`` and ``top -c``).
2508+
2509+
For example, if you set the option to ``myservice - {{ instance_name }}``:
2510+
2511+
.. code-block:: yaml
2512+
2513+
process:
2514+
title: myservice - {{ instance_name }}
24322515

2516+
:samp:`ps -ef` might show the Tarantool server process like this:
2517+
2518+
.. code-block:: console
2519+
2520+
$ ps -ef | grep tarantool
2521+
503 68100 68098 0 10:33 pts/2 00:00.10 tarantool <running>: myservice instance1
24332522
|
24342523
| Type: string
24352524
| Default: 'tarantool - {{ instance_name }}'
@@ -2439,8 +2528,14 @@ The ``process`` defines configuration parameters of the Tarantool process in the
24392528

24402529
.. confval:: process.pid_file
24412530

2531+
**Since:** :doc:`3.0.0 </release/3.0.0>`.
2532+
24422533
Store the process id in this file.
24432534

2535+
This option may contain a relative file path.
2536+
In this case, it is interpreted as relative to
2537+
:ref:`process.work_dir <configuration_reference_process_work_dir>`.
2538+
24442539
|
24452540
| Type: string
24462541
| Default: 'var/run/{{ instance_name }}/tarantool.pid'
@@ -2450,8 +2545,10 @@ The ``process`` defines configuration parameters of the Tarantool process in the
24502545

24512546
.. confval:: process.strip_core
24522547

2453-
Whether coredump files should include memory allocated for tuples.
2454-
(This can be large if Tarantool runs under heavy load.)
2548+
**Since:** :doc:`3.0.0 </release/3.0.0>`.
2549+
2550+
Whether coredump files should not include memory allocated for tuples --
2551+
this memory can be large if Tarantool runs under heavy load.
24552552
Setting to ``true`` means "do not include".
24562553

24572554
|
@@ -2463,6 +2560,8 @@ The ``process`` defines configuration parameters of the Tarantool process in the
24632560

24642561
.. confval:: process.username
24652562

2563+
**Since:** :doc:`3.0.0 </release/3.0.0>`.
2564+
24662565
The name of the system user to switch to after start.
24672566

24682567
|
@@ -2474,7 +2573,21 @@ The ``process`` defines configuration parameters of the Tarantool process in the
24742573

24752574
.. confval:: process.work_dir
24762575

2477-
A directory where Tarantool working files are stored.
2576+
**Since:** :doc:`3.0.0 </release/3.0.0>`.
2577+
2578+
A directory where Tarantool working files will be stored
2579+
(database files, logs, a PID file, a console Unix socket, and other files
2580+
if an application generates them in the current directory).
2581+
The server instance switches to ``process.work_dir`` with
2582+
:manpage:`chdir(2)` after start.
2583+
2584+
If set as a relative file path, it is relative to the current
2585+
working directory, from where Tarantool is started.
2586+
If not specified, defaults to the current working directory.
2587+
2588+
Other directory and file parameters, if set as relative paths,
2589+
are interpreted as relative to ``process.work_dir``. For example,
2590+
:ref:`directories for storing snapshots and write-ahead logs <configuration_options_directories>`
24782591

24792592
|
24802593
| Type: string

0 commit comments

Comments
 (0)