Skip to content

Commit bb84a29

Browse files
committed
Revise admin chapter (iteration #2)
1 parent 5d31fda commit bb84a29

File tree

7 files changed

+61
-48
lines changed

7 files changed

+61
-48
lines changed

doc/1.7/book/admin/daemon_supervision.rst

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@ long-running procedure which prevents return to the main thread event loop.
4747
Automatic instance restart
4848
--------------------------------------------------------------------------------
4949

50-
``systemd`` automatically restarts all Tarantool instances in case of failure.
51-
To demonstrate it, let’s try to destroy an instance:
50+
On ``systemd``-enabled platforms, ``systemd`` automatically restarts all
51+
Tarantool instances in case of failure. To demonstrate it, let’s try to destroy
52+
an instance:
5253

5354
.. code-block:: bash
5455
@@ -89,25 +90,25 @@ Finally, let’s check the boot logs:
8990
Core dumps
9091
--------------------------------------------------------------------------------
9192

92-
Tarantool makes a core dump if it receives any of these signals: SIGSEGV, SIGFPE,
93-
SIGABRT or SIGQUIT. This is automatic if Tarantool crashes. On systems with
94-
``systemd``, ``coredumpctl`` automatically saves core dumps and stack traces in
95-
case of a crash.
93+
Tarantool makes a core dump if it receives any of the following signals: SIGSEGV,
94+
SIGFPE, SIGABRT or SIGQUIT. This is automatic if Tarantool crashes.
9695

97-
For this to work, make sure in advance that:
96+
On ``systemd``-enabled platforms, ``coredumpctl`` automatically saves core dumps
97+
and stack traces in case of a crash. Here is a general "how to" for how to
98+
enable core dumps on a Unix system:
9899

99-
* Core dumps are enabled on the system. In Linux, you might need to say
100-
``ulimit -c unlimited``, but there are many other reasons why a core dump will
101-
not be produced, as explained by "man 5 core". Often core dumps are not allowed
102-
by default because core dumps can be large.
100+
1. Ensure session limits are configured to enable core dumps, i.e. say
101+
``ulimit -c unlimited``. Check "man 5 core" for other reasons why a core
102+
dump may not be produced.
103103

104-
* You know what directory core dumps would be written to, and be sure that that
105-
directory is writable.
104+
2. Set a directory for writing core dumps to, and make sure that the directory
105+
is writable. On Linux, the directory path is set in a kernel parameter
106+
configurable via ``/proc/sys/kernel/core_pattern``.
106107

107-
* A core dump will include stack trace information. If you use a binary
108-
distribution, this is automatic. If you build Tarantool from source, you will
109-
not get detailed information if you pass ``-DCMAKE_BUILD_TYPE=Release``
110-
to CMake.
108+
3. Make sure that core dumps include stack trace information. If you use a
109+
binary Tarantool distribution, this is automatic. If you build Tarantool
110+
from source, you will not get detailed information if you pass
111+
``-DCMAKE_BUILD_TYPE=Release`` to CMake.
111112

112113
To simulate a crash, you can execute an illegal command against a Tarantool
113114
instance:
@@ -116,13 +117,10 @@ instance:
116117
117118
$ # !!! please never do this on a production system !!!
118119
$ tarantoolctl enter my_app
119-
/bin/tarantoolctl: Found my_app.lua in /etc/tarantool/instances.available
120-
/bin/tarantoolctl: Connecting to /var/run/tarantool/my_app.control
121-
/bin/tarantoolctl: connected to unix/:/var/run/tarantool/my_app.control
122120
unix/:/var/run/tarantool/my_app.control> require('ffi').cast('char *', 0)[0] = 48
123121
/bin/tarantoolctl: unix/:/var/run/tarantool/my_app.control: Remote host closed connection
124122
125-
Alternatively, if you know the process id of the instance (here we refer to it
123+
Alternatively, if you know the process ID of the instance (here we refer to it
126124
as $PID), you can abort a Tarantool instance by running ``gdb`` debugger:
127125

128126
.. code-block:: bash
@@ -145,7 +143,8 @@ or manually sending a SIGABRT signal:
145143

146144
* say ``systemctl status tarantool@my_app|grep PID``.
147145

148-
To see the latest crashes of the Tarantool daemon, say:
146+
On a ``systemd-enabled`` system, to see the latest crashes of the Tarantool
147+
daemon, say:
149148

150149
.. code-block:: bash
151150

doc/1.7/book/admin/disaster_recovery.rst

Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -44,28 +44,40 @@ transferred to the replica before crash. If you were able to salvage the master
4444

4545
1. Find out the position of the crashed master, as reflected on the new master.
4646

47-
2. Find out instance UUID from the crashed master xlog:
47+
a. Find out instance UUID from the crashed master xlog:
4848

49-
.. code-block:: bash
50-
51-
$ head -5 *.xlog | grep Instance
52-
Instance: ed607cad-8b6d-48d8-ba0b-dae371b79155
49+
.. code-block:: bash
50+
51+
$ head -5 *.xlog | grep Instance
52+
Instance: ed607cad-8b6d-48d8-ba0b-dae371b79155
5353
54-
3. On the new master, use the UUID to find the position:
54+
b. On the new master, use the UUID to find the position:
5555

56-
.. code-block:: tarantoolsession
57-
58-
tarantool>box.info.vclock[box.space._cluster.index.uuid:select{'ed607cad-8b6d-48d8-ba0b-dae371b79155'}[1][1]]
59-
---
60-
- 23425
61-
<...>
56+
.. code-block:: tarantoolsession
6257
63-
4. Play the records from the crashed .xlog to the new master, starting from the
58+
tarantool>box.info.vclock[box.space._cluster.index.uuid:select{'ed607cad-8b6d-48d8-ba0b-dae371b79155'}[1][1]]
59+
---
60+
- 23425
61+
<...>
62+
63+
2. Play the records from the crashed .xlog to the new master, starting from the
6464
new master position:
65-
66-
.. code-block:: tarantoolsession
6765

68-
$ tarantoolctl <new_master_uri> <xlog_file> play --from-lsn 23425
66+
a. Issue this request locally at the new master's machine to find out
67+
instance ID of the new master:
68+
69+
.. code-block:: tarantoolsession
70+
71+
tarantool> box.space._cluster:select{}
72+
---
73+
- - [1, '88580b5c-4474-43ab-bd2b-2409a9af80d2']
74+
...
75+
76+
b. Play the records to the new master:
77+
78+
.. code-block:: tarantoolsession
79+
80+
$ tarantoolctl <new_master_uri> <xlog_file> play --from-lsn 23425 -- replica_id 1
6981
7082
.. _admin-disaster_recovery-master_master:
7183

@@ -108,3 +120,5 @@ Your actions:
108120

109121
3. Start a new instance (instance#1) and use ``tarantoolctl play`` command to
110122
play to it the contents of .snap/.xlog files up to the calculated lsn.
123+
124+
4. Bootstrap a new replica from the recovered master (instance#1).

doc/1.7/book/admin/logs.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Then check the logs:
3838
2017-04-04 15:54:04.989 [29255] main C> entering the event loop
3939
2017-04-04 15:54:47.147 [29255] main/107/console/unix/: I> Hello for the manual readers
4040
41-
When logging to a log file, the system administrator must ensure logs are
41+
When logging to a file, the system administrator must ensure logs are
4242
rotated timely and do not take up all the available disk space. With
4343
``tarantoolctl``, log rotation is pre-configured to use ``logrotate`` program,
4444
which you must have installed.

doc/1.7/book/admin/security.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ For example:
5555
Tarantool 1.7.3 (Lua console)
5656
type 'help' for interactive help
5757
58-
In this example, the response does not include the word binary and does
59-
include the words Lua console. Therefore it is clear that this is a successful
58+
In this example, the response does not include the word "binary" and does
59+
include the words "Lua console". Therefore it is clear that this is a successful
6060
connection to a port for admin console, and you can now enter admin requests on
6161
this terminal.
6262

@@ -74,5 +74,5 @@ privilege.
7474

7575
Therefore, when ``ssh`` access to the machine is not available, creating a
7676
Tarantool user with global "EXECUTE" privilege and non-empty password can be
77-
used to provide a system administrator remote access to an instance.
77+
used to provide a system administrator **remote** access to an instance.
7878

doc/1.7/book/admin/server_introspection.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ You can attach to an instance's admin console and execute some Lua code using
3535

3636
.. code-block:: bash
3737
38-
# for local instances:
38+
$ # for local instances:
3939
$ tarantoolctl enter my_app
4040
/bin/tarantoolctl: Found my_app.lua in /etc/tarantool/instances.available
4141
/bin/tarantoolctl: Connecting to /var/run/tarantool/my_app.control
@@ -46,7 +46,7 @@ You can attach to an instance's admin console and execute some Lua code using
4646
...
4747
unix/:/var/run/tarantool/my_app.control>
4848
49-
# for local and remote instances:
49+
$ # for local and remote instances:
5050
$ tarantoolctl connect username:[email protected]:3306
5151
5252
You can also use ``tarantoolctl`` to execute Lua code on an instance without

doc/1.7/book/admin/upgrades.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ when migrating from Tarantool 1.6. to 1.8 directly.
4242

4343
This procedure is for upgrading a standalone Tarantool instance in production
4444
from 1.6.x to 1.7.x. Notice that this will **always imply a downtime**.
45-
To upgrade without downtime, you need several Tarantool servers running in a
45+
To upgrade **without downtime**, you need several Tarantool servers running in a
4646
replication cluster (see :ref:`below <admin-upgrades_replication_cluster>`).
4747

48-
Tarantool 1.7 has an incompatible snapshot and .xlog file format: 1.6 files are
48+
Tarantool 1.7 has an incompatible .snap and .xlog file format: 1.6 files are
4949
supported during upgrade, but you won’t be able to return to 1.6 after running
5050
under 1.7 for a while. It also renames a few configuration parameters, but old
5151
parameters are supported. The full list of breaking changes is available in
@@ -73,7 +73,7 @@ To upgrade from Tarantool 1.6 to 1.7:
7373

7474
6. Update application files, if needed.
7575

76-
7. Launch the updated Tarantool server.
76+
7. Launch the updated Tarantool server using ``tarantoolctl`` or ``systemctl``.
7777

7878
.. _admin-upgrades_replication_cluster:
7979

doc/1.7/reference/tarantoolctl.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _tarantoolctl:
22

33
--------------------------------------------------------------------------------
4-
tarantoolctl
4+
Utility `tarantoolctl`
55
--------------------------------------------------------------------------------
66

77
``tarantoolctl`` is a utility for administering Tarantool instances. It is

0 commit comments

Comments
 (0)