Cluster commands
The nova commands that check node health, list the fleet, drain and retire nodes, and operate embedded oxia.
The cluster commands talk to one node at the address in --addr or
NOVA_ADDR: they print its health, list the live nodes, drain or retire a
node, and run the metadata store that nodes embed. They need a host:port
address and nova:admin, from an API key, a token, or --admin-user and
--admin-password. A bucket token fails with
PermissionDenied desc = novad: admin verb requires the nova:admin marker.
The examples ran on four nodes on one machine, storing records in RustFS.
Three are metadata peers, at 127.0.0.1:8351 to 8353: the nodes named
in novad --oxia-server-peers, which run the embedded metadata store's
coordinator and vote in its quorum. The fourth, at 127.0.0.1:8354, is a
member that runs no coordinator.
export NOVA_ADDR=127.0.0.1:8351| Command | Does |
|---|---|
nova health | Prints one node's status |
nova fleet | Lists the live nodes |
nova node drain | Moves a node's streams to other nodes, or stops doing so |
nova node decommission | Retires a node's identity for good |
nova oxia peers | Shows the metadata store's raft group |
nova oxia hot | Names metadata shards that need a split |
nova oxia split | Splits one metadata shard |
nova oxia attach | Adds an external oxia data server |
nova health
Prints the status of the node at --addr.
nova health [options]Check a node
nova healthSERVING node=01a20489-5cf3-75c4-8efc-b5d5a951e9ae zone=az-1 version=dev (896dd4adce988f95829c23fced8e1f7361fc87e4-dirty) leading=0The line starts with SERVING, or DRAINING while a drain is on. Then come
the node's ID, its zone from novad --zone (empty when unset), its build,
and how many streams it leads. A draining node that leads nothing adds a
second line, drained: safe to decommission. Check another node with
--addr:
nova --addr 127.0.0.1:8354 healthA node that cannot be reached fails with exit code 1. The command has no
options of its own. Nodes covers the HTTP health and
readiness endpoints that probes use.
nova fleet
Lists the live nodes from the cluster's registry, one per line.
nova fleet [options]List the nodes
nova fleet01a20489-5cf3-75c4-8efc-b5d5a951e9ae zone=az-1 addr=127.0.0.1:8351
01a20489-a7dc-7caa-8a89-45cb2c56dd1b zone=az-2 addr=127.0.0.1:8352
01a20489-a8d4-7a8b-b0e9-794da77a3afc zone=az-3 addr=127.0.0.1:8353
01a20489-bc94-7470-be26-5fe92cdda479 zone=az-1 addr=127.0.0.1:8354Each line is a node's ID, zone, and the address clients reach it at. Any node answers for the whole cluster. A node leaves the list when it stops, and comes back when it starts again, unless it was decommissioned. The command has no options of its own.
nova node drain
Starts the drain of the node at --addr: it hands the streams it leads to
other nodes and takes no new ones. --stop ends a drain.
nova node drain [options]Drain a node
nova --addr 127.0.0.1:8354 node draindraining
DRAINING node=01a20489-bc94-7470-be26-5fe92cdda479 zone=az-1 version=dev (896dd4adce988f95829c23fced8e1f7361fc87e4-dirty) leading=0
drained: safe to decommissionThis node led no streams, so it was drained at once. A busy node first gives
its producers a grace period, novad --drain-session-grace (30 seconds by
default), then hands its streams over. Run nova health against it until it
prints drained: safe to decommission.
Stop a drain
nova --addr 127.0.0.1:8354 node drain --stopdrain stoppedThe node serves again and can lead streams. A node does not remember a drain
across a restart. Once the node has started shutting down, --stop is
refused.
Draining a node explains what moves and when.
nova node decommission
Retires a node's ID for good: the cluster recovers what the node wrote and refuses the ID from then on.
nova node decommission [options]Retire a drained node
Send it to any live node, with the retired node's ID from nova fleet:
nova node decommission --star 01a20489-bc94-7470-be26-5fe92cdda479 --waitoxia is still draining the star's metadata replicas; keep the star running — asking again every 5s
star 01a20489-bc94-7470-be26-5fe92cdda479 decommissioned: it can never register again; replacement hardware mints a fresh idThe node's copies of metadata shards must move to other nodes first, so keep
it running until the command succeeds. That took about 11 seconds here. Without
--wait, the command stops at the first check and exits 3:
nova: client: the star's metadata replicas are still draining: decommission: novad: 01a20489-bc94-7470-be26-5fe92cdda479: coord: the star's metadata replicas are still draining (embedded: oxia is still draining the data server: 01a20489-bc94-7470-be26-5fe92cdda479 is DATA_SERVER_STATE_DRAINING, 15 replicas left); keep the star running, and ask again (-wait asks until done)Then stop the node. If it starts again with the same directory, it exits with
coord: star decommissioned. A new machine gets a new ID.
A running node must be drained first. Otherwise the command fails with exit
code 1:
nova: rpc error: code = FailedPrecondition desc = decommission: star 01a20489-a8d4-7a8b-b0e9-794da77a3afc is alive and not fully drained (drained=false leading=0); drain it and wait for drained with leading=0A node that is gone already needs no drain. Use --force only for a node that
is still registered but does not answer. Decommission cannot be undone.
Decommission explains what the cluster recovers.
nova oxia peers
Prints the raft group of the embedded metadata store's coordinators, as the
node at --addr sees it.
nova oxia peers [options]Show the peers
nova oxia peers127.0.0.1:8360 leader
127.0.0.1:8370 voter
127.0.0.1:8380 voterEach line is a peer's oxia address and its role: leader, voter, or
joining while a new peer catches up. Ask a metadata peer. A member node
fails with a standalone star has no coordinator, and a node that embeds no
oxia with oxia: this star serves no embedded oxia. The nova oxia commands
are for clusters that the Kubernetes operator does not manage.
nova oxia hot
Names the metadata shards that are busy enough to split. It checks the
shards of the nova-streams keyspace, which holds the streams' metadata.
nova oxia hot [options]Check for hot shards
nova oxia hotno shard above the split triggerA hot shard prints one line with its namespace, number, hash span, operations
a second, and the share of its busiest bucket, ending with the
oxia split command that cuts it.
Splitting hot shards gives
the trigger.
nova oxia split
Splits one metadata shard in two. Oxia never merges shards, so a split is permanent.
nova oxia split [options]Split a shard at a point
nova oxia split --shard 2 --point 2684354560shard 2 of nova-streams: split accepted at 2684354560Without --point, the coordinator cuts where the shard's load suggests. A
shard with no load to measure fails with embedded: nothing left to cut, so
name a point. The point is a hash inside the shard's span on the 32-bit ring.
A shard whose copies are still moving fails with
shard 0 has pending ensemble changes; try again later.
nova oxia attach
Adds an external oxia data server to the embedded metadata store. It is the first step of moving the metadata out of the nodes.
nova oxia attach [options]Attach a server
nova oxia attach --name oxia-ext-1 --public 127.0.0.1:8397 --internal 127.0.0.1:8398oxia-ext-1 attached to embedded oxia at 127.0.0.1:8397 (internal 127.0.0.1:8398); the balancer places shards on it as the factor allowsThe coordinator does not check that the server answers before it accepts it. Moving the metadata store out gives the full procedure.