ltcluster service pause — Instruct all ltclusterd instances in the replication cluster to pause failover operations
This command can be run on any active node in the replication cluster to instruct all running ltclusterd instances to "pause" themselves, i.e. take no action (such as promoting themselves or following a new primary) if a failover event is detected.
This functionality is useful for performing maintenance operations, such as switchovers or upgrades, which might otherwise trigger a failover if ltclusterd is running normally.
It's important to wait a few seconds after restarting LightDB on any node before running
ltcluster service pause
, as the ltclusterd instance
on the restarted node will take a second or two before it has updated its status.
ltcluster service unpause will instruct all previously paused ltclusterd instances to resume normal failover operation.
LightDB must be accessible on all nodes (using the conninfo
string shown by
ltcluster cluster show
)
from the node where ltcluster service pause
is executed.
ltcluster service pause
can be executed on any active node in the
replication cluster. A valid ltcluster.conf
file is required.
It will have no effect on previously paused nodes.
$ ltcluster -f /etc/ltcluster.conf service pause NOTICE: node 1 (node1) paused NOTICE: node 2 (node2) paused NOTICE: node 3 (node3) paused
--dry-run
Check if nodes are reachable but don't pause ltclusterd.
One of the following exit codes will be emitted by ltcluster service unpause
:
SUCCESS (0)
ltclusterd could be paused on all nodes.
ERR_LTCLUSTERD_PAUSE (26)
ltclusterd could not be paused on one or mode nodes.