|
| 1 | +.. _tcm_supervised_failover: |
| 2 | + |
| 3 | +Using supervised failover |
| 4 | +========================= |
| 5 | + |
| 6 | +.. include:: ../index.rst |
| 7 | + :start-after: ee_note_tcm_start |
| 8 | + :end-before: ee_note_tcm_end |
| 9 | + |
| 10 | +For Tarantool clusters that use :ref:`supervised failover <repl_supervised_failover>`, |
| 11 | +|tcm_full_name| offers tools for interaction with external failover coordinators from its web interface. |
| 12 | + |
| 13 | +The tools for using supervised failover are located on the **Failovers** page |
| 14 | +available from the **Actions** menu on the cluster stateboard. |
| 15 | + |
| 16 | +.. note:: |
| 17 | + |
| 18 | + |tcm| can interact with failover coordinators that are already running. |
| 19 | + There is no way to start or stop coordinators from |tcm|. |
| 20 | + |
| 21 | +.. _tcm_supervised_failover_view: |
| 22 | + |
| 23 | +Viewing failover coordinators |
| 24 | +----------------------------- |
| 25 | + |
| 26 | +To view failover coordinators running on the cluster, go to the **Failovers** tab. |
| 27 | +On this tab, you can see the information about all Tarantool instances that the cluster |
| 28 | +uses as failover coordinators. The information includes: |
| 29 | + |
| 30 | +- Current coordinator status -- ``Active`` or ``Not active`` |
| 31 | +- ``PID`` -- process ID |
| 32 | +- ``Hostname`` -- the host on which the coordinator is running |
| 33 | +- ``UUID`` -- the coordinator ID |
| 34 | +- ``Term`` -- a value that defines the order in which coordinators become active |
| 35 | + (take the lock) over time. |
| 36 | + |
| 37 | + |
| 38 | +.. _tcm_supervised_failover_commands: |
| 39 | + |
| 40 | +Executing failover commands |
| 41 | +--------------------------- |
| 42 | + |
| 43 | +To send a failover command to a coordinator, go to the **Commands** tab and click **Add**. |
| 44 | +Then, provide the command description in the YAML format. It can include the following |
| 45 | +fields: |
| 46 | + |
| 47 | +- ``command`` -- the command name. Possible value: ``switch`` -- switch master |
| 48 | + in a replica set. |
| 49 | +- ``new_master`` -- the name of the instance to make the new master. |
| 50 | +- ``timeout`` -- the command execution timeout. |
| 51 | + |
| 52 | +Example: |
| 53 | + |
| 54 | +.. code-block:: yaml |
| 55 | +
|
| 56 | + command: switch |
| 57 | + new_master: instance-002 |
| 58 | + timeout: 30 |
| 59 | +
|
| 60 | +After entering the command, click **Save** to send the command for execution. |
| 61 | + |
| 62 | +Tarantool assigns an id to the command and waits for the active coordinator to process the command. |
| 63 | + |
| 64 | +All failover commands executed on the cluster are shown on the **Commands** tab with |
| 65 | +their ids and statuses. A command can have the following statuses: |
| 66 | + |
| 67 | +- ``taken`` -- a failover coordinator has started the command execution. |
| 68 | +- ``success`` -- the command has completed successfully. |
| 69 | +- ``failed`` -- an error occurred during the command execution. |
| 70 | + A short error description is shown in the **Reason** field. |
| 71 | + |
| 72 | +To see the command execution details, click this command in the list. |
0 commit comments