From b10f6f7be086fbfec700f25a409579b797b0bad3 Mon Sep 17 00:00:00 2001 From: Pavel Semyonov Date: Thu, 5 Sep 2024 14:16:45 +0700 Subject: [PATCH 1/4] Add TCM failover docs --- .../tcm/tcm_cluster_management/index.rst | 3 +- .../tcm_supervised_failover.rst | 67 +++++++++++++++++++ 2 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 doc/tooling/tcm/tcm_cluster_management/tcm_supervised_failover.rst diff --git a/doc/tooling/tcm/tcm_cluster_management/index.rst b/doc/tooling/tcm/tcm_cluster_management/index.rst index 99065b9dc..6062714e3 100644 --- a/doc/tooling/tcm/tcm_cluster_management/index.rst +++ b/doc/tooling/tcm/tcm_cluster_management/index.rst @@ -17,4 +17,5 @@ to learn how to perform various management operations on Tarantool clusters from tcm_cluster_state tcm_cluster_config tcm_cluster_users - tcm_cluster_metrics \ No newline at end of file + tcm_cluster_metrics + tcm_supervised_failover \ No newline at end of file diff --git a/doc/tooling/tcm/tcm_cluster_management/tcm_supervised_failover.rst b/doc/tooling/tcm/tcm_cluster_management/tcm_supervised_failover.rst new file mode 100644 index 000000000..9314eb235 --- /dev/null +++ b/doc/tooling/tcm/tcm_cluster_management/tcm_supervised_failover.rst @@ -0,0 +1,67 @@ +.. _tcm_supervised_failover: + +Using supervised failover +========================= + +.. include:: ../index.rst + :start-after: ee_note_tcm_start + :end-before: ee_note_tcm_end + +For Tarantool clusters that use :ref:`supervised failover` `, +|tcm_full_name| offers tools for interaction with failover coordinators from its web interface. + +The tools for using supervised failover are located on the **Failovers** page +available from the **Actions** menu on the cluster stateboard. + +.. _tcm_supervised_failover_view: + +Viewing failover coordinators +----------------------------- + +To view failover coordinators running on the cluster, go to the **Failovers** tab. +On this tab, you can see the information about all Tarantool instances that the cluster +uses as failover coordinators. The information includes: + +- Current coordinator status -- ``Active`` or ``Not active`` +- ``PID`` -- process ID +- ``Hostname`` -- the host on which the coordinator is running +- ``UUID`` -- the coordinator ID +- ``Term`` -- a value that defines the order in which coordinators become active + (take the lock) over time. + + +.. _tcm_supervised_failover_commands: + +Executing failover commands +--------------------------- + +To send a failover command to a coordinator, go to the **Commands** tab and click **Add**. +Then, provide the command description in the YAML format. It can include the following +fields: + +- ``command`` -- the command name. Possible value: ``switch`` -- switch master + in a replica set. +- ``new_master`` -- the name of the instance to make the new master. +- ``timeout``: the command execution timeout. + +Example: + +.. code-block:: yaml + + command: switch + new_master: instance-002 + timeout: 30 + +After entering the command, click **Save**. + +Tarantool assigns an id to the command and waits for a coordinator to process the command. + +All failover commands executed on the cluster are shown on the **Commands** tab with +their ids and statuses. A command can have the following statuses: + +- ``taken`` -- a failover coordinator has started the command execution. +- ``success`` -- the command has completed successfully. +- ``failed`` -- an error occurred during the command execution. + A short error description is shown in the **Reason** field. + +To see the command execution details, click it in the commands list. From ccfa3c3987d4510ad299995232031f8ddd4d9cb0 Mon Sep 17 00:00:00 2001 From: Pavel Semyonov Date: Thu, 5 Sep 2024 14:31:12 +0700 Subject: [PATCH 2/4] Add TCM failover docs --- .../tcm_supervised_failover.rst | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/doc/tooling/tcm/tcm_cluster_management/tcm_supervised_failover.rst b/doc/tooling/tcm/tcm_cluster_management/tcm_supervised_failover.rst index 9314eb235..96ccd93be 100644 --- a/doc/tooling/tcm/tcm_cluster_management/tcm_supervised_failover.rst +++ b/doc/tooling/tcm/tcm_cluster_management/tcm_supervised_failover.rst @@ -7,12 +7,17 @@ Using supervised failover :start-after: ee_note_tcm_start :end-before: ee_note_tcm_end -For Tarantool clusters that use :ref:`supervised failover` `, -|tcm_full_name| offers tools for interaction with failover coordinators from its web interface. +For Tarantool clusters that use :ref:`supervised failover `, +|tcm_full_name| offers tools for interaction with external failover coordinators from its web interface. The tools for using supervised failover are located on the **Failovers** page available from the **Actions** menu on the cluster stateboard. +.. note:: + + |tcm| can interact with failover coordinators that are already running. + There is no way to start or stop coordinators from |tcm|. + .. _tcm_supervised_failover_view: Viewing failover coordinators @@ -42,7 +47,7 @@ fields: - ``command`` -- the command name. Possible value: ``switch`` -- switch master in a replica set. - ``new_master`` -- the name of the instance to make the new master. -- ``timeout``: the command execution timeout. +- ``timeout`` -- the command execution timeout. Example: @@ -52,7 +57,7 @@ Example: new_master: instance-002 timeout: 30 -After entering the command, click **Save**. +After entering the command, click **Save** to send the command for execution. Tarantool assigns an id to the command and waits for a coordinator to process the command. From ef0e611fb459707e74d3b0c4d37592ec89c9c1b1 Mon Sep 17 00:00:00 2001 From: Pavel Semyonov Date: Thu, 5 Sep 2024 17:25:45 +0700 Subject: [PATCH 3/4] Update doc/tooling/tcm/tcm_cluster_management/tcm_supervised_failover.rst Co-authored-by: Elena Shebunyaeva --- .../tcm/tcm_cluster_management/tcm_supervised_failover.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/tooling/tcm/tcm_cluster_management/tcm_supervised_failover.rst b/doc/tooling/tcm/tcm_cluster_management/tcm_supervised_failover.rst index 96ccd93be..115cfbf27 100644 --- a/doc/tooling/tcm/tcm_cluster_management/tcm_supervised_failover.rst +++ b/doc/tooling/tcm/tcm_cluster_management/tcm_supervised_failover.rst @@ -69,4 +69,4 @@ their ids and statuses. A command can have the following statuses: - ``failed`` -- an error occurred during the command execution. A short error description is shown in the **Reason** field. -To see the command execution details, click it in the commands list. +To see the command execution details, click this command in the commands list. From ec24d26f3a0782aeaa62b7c27ab0277b3843d4a3 Mon Sep 17 00:00:00 2001 From: Pavel Semyonov Date: Thu, 5 Sep 2024 17:27:03 +0700 Subject: [PATCH 4/4] Add TCM failover docs --- .../tcm/tcm_cluster_management/tcm_supervised_failover.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/tooling/tcm/tcm_cluster_management/tcm_supervised_failover.rst b/doc/tooling/tcm/tcm_cluster_management/tcm_supervised_failover.rst index 115cfbf27..89e599ede 100644 --- a/doc/tooling/tcm/tcm_cluster_management/tcm_supervised_failover.rst +++ b/doc/tooling/tcm/tcm_cluster_management/tcm_supervised_failover.rst @@ -59,7 +59,7 @@ Example: After entering the command, click **Save** to send the command for execution. -Tarantool assigns an id to the command and waits for a coordinator to process the command. +Tarantool assigns an id to the command and waits for the active coordinator to process the command. All failover commands executed on the cluster are shown on the **Commands** tab with their ids and statuses. A command can have the following statuses: @@ -69,4 +69,4 @@ their ids and statuses. A command can have the following statuses: - ``failed`` -- an error occurred during the command execution. A short error description is shown in the **Reason** field. -To see the command execution details, click this command in the commands list. +To see the command execution details, click this command in the list.