Feature: Tooling: "get instances" command
CLI
-
Command:
picodata get instances --address ADDR [--format j[son]|t[able] ] picodata g i -a ADDR -f jwhere ADDR is the address of any instance of the cluster
-
Output
The output should be in table format by default and optionally in JSON format
Table:
CLUSTER REPLICASET INSTANCE STATUS ADDRESS cluster1 rs1 i1 active 10.0.0.1:3301 cluster1 rs1 i2 standby 10.0.0.2:3301 cluster1 rs2 i3 unreachable 10.0.0.3:3301 cluster1 rs2 i4 starting 10.0.0.4:3301 cluster1 - i5 inactive 10.0.0.5:3301JSON:
[ {"cluster": "cluster1", "replicaset": "rs1", ...}, ... ]Status:
-
active- the instance is writable and is OK -
standby- the instance is read-only and is applying the changes from the active instance and the replication lag <= 10 seconds -
unreachable- the instance is unable to exchange data with the cluster -
stale- the instance has stale Raft log and therefore is not up-to date with the cluster -
lag- the standby instance's replication lag is more than 10 seconds behind the current active instance in the replicaset -
inactive- the instance is not part of any replicaset (skip this if auto-topology is not implemented yet) -
starting- Tarantool is loading the snapshot.
-
DoD
-
implemented -
int test with json style output -
the command usage is covered in the docs on the website: -
a basic example of the command usage -
output example -
status variants description
-
Motivation
- Create a basic command that allows to check the overall cluster health.
- Handy output to use in presentations.
- Create a basis for future CLI tooling development.
- Demonstrate the look and feel of Picodata's CLI tooling in terms of flags usage, commands and subcommands short forms usage.
Edited by Valentin Syrovatskiy