The command below is used to list the leader node of the storage node and GMS node:
kubectl get xstore wuzhe-test2-shmr-dn-3
NAME LEADER READY PHASE DISK VERSION AGE
wuzhe-test2-shmr-dn-3 wuzhe-test2-shmr-dn-3-cands-0 1/1 Running 1.1 GiB 5.7.14-AliSQL-X-Cluster-1.6.1.1-20220520-log 3m11s
The LEADER
column demonstrates the Pod of the leader node。
If this column is empty, it indicates that no leader node has been detected, and it is necessary to further determine which scenario this might be:
- Check whether the pods corresponding to the storage nodes are not running
- Investigate the logs within the Pod
- Investigate the logs of the operator
The command below is used to access a Pod of storage node and list the leader node of storage node within the Pod:
kubectl exec -it wuzhe-test2-shmr-dn-3-cands-0 bash
kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.
Defaulted container "engine" out of: engine, exporter, prober
[root@iZ8vb9igdh4szqgoyfjt03Z /]
#xsl consensus role --report-leader
leader
wuzhe-test2-shmr-dn-3-cands-0