Draft
Conversation
Queries etcd directly to list nodes in the in-sync replica set, their advertised addresses, and whether each node is leader or follower. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Handle empty etcd response in get_prefix (no kvs key) - Show "unknown" role when no leader is elected - Default --etcd-endpoints to localhost:2379 - Remove blank separator before version/help flags Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
No issues found. |
Lists etcd cluster members using the MemberList API, showing name, peer_urls, client_urls and learner status. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
I have read the CLA Document and I hereby sign the CLA 1 out of 2 committers have signed the CLA. |
|
Added lavinmqctl list_etcd_members command |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to #1350
Summary
lavinmqctl list_in_sync_replicascommand that queries etcd directly (no LavinMQ HTTP API required)node_id,address, androle(leader/follower) for each in-sync replicalavinmqctl list_etcd_memberscommand that queries the etcd MemberList API directlyname,peer_urls,client_urls, andlearnerstatus for each etcd member--etcd-endpointsand--etcd-prefixglobal options (also read fromLAVINMQ_CLUSTERING_ETCD_ENDPOINTS/LAVINMQ_CLUSTERING_ETCD_PREFIXenv vars)election_leaderandmember_listmethods toEtcdclassHow it works
Node addresses are discovered by calling
get_prefix("{prefix}/leader/")— etcd stores each campaigning node's advertised URI under{prefix}/leader/{hex_lease_id}, where the hex lease ID converts to the base-36 node ID viahex.to_i64(16).to_s(36).list_etcd_memberscalls/v3/cluster/member/listdirectly, giving operators visibility into the etcd layer that LavinMQ clustering depends on. Since etcd quorum loss means LavinMQ loses leader election and ISR tracking, this command helps with:client_urlsto use for--clustering-etcd-endpointsTest plan
lavinmqctl --etcd-endpoints=<host:port> list_in_sync_replicaslavinmqctl --etcd-endpoints=<host:port> list_etcd_members🤖 Generated with Claude Code