yugabyte/yugabyte-db

Request : Listing of hostnames (nodenames, IPs) in alfabetical order.

Open

#18,983 opened on Sep 4, 2023

View on GitHub
 (1 comment) (0 reactions) (1 assignee)C (1,003 forks)batch import
area/docdbgood first issuekind/enhancementpriority/medium

Repository metrics

Stars
 (8,229 stars)
PR merge metrics
 (Avg merge 17d 21h) (92 merged PRs in 30d)

Description

Jira Link: DB-8417

Description

This concerns : yb-admin output and yugatool output.

Currently, I use 3 means to monitor host/nodes/servers:
yb-admin (list masters, list tservers), yugatool (cluster_info) select * from yb_servers()

Each of those provides lists (or tuples, or lines) of hosts, but often in seemingly random order.

To quickly inspect the state of my hosts, I sometimes "assume" that the listings are in the same order. But they often are not or the order seems to change (with stop/start of components?). The order in which those hosts appear is seemingly random ?

When I list my hosts using Select host from yb_servers() I tend to add order-by-host, and that ordering is logical, consistent, and easy to read. But when I look at stdout from yb-admin or yugatool, there seems to be no consistent ordering. This makes "spotting" of dead-nodes, or any monitoring or troubleshooting slightly confusing, as I have to always carefully look for host:port, and and alway have to check the IPs or nodenames.

Attached: Screenshot of: yb-admin (masters + tservers) follwed by a select yb_servers() - which I do automatically on logon via .psqlrc; The ordering of the tsverver from yb-admin is (accidentally) reverse-alphabetic, with funny enough the dead-nodes on top.

Hence the Request, for yb-admin and yugatool: Always present in order of host(name) ?

Warning: Please confirm that this issue does not contain any sensitive information

  • I confirm this issue does not contain any sensitive information.

Contributor guide