This commit is contained in:
2026-07-09 13:11:20 +02:00
parent 1e9e419e9b
commit 4557fcca7b

View File

@@ -176,15 +176,22 @@ func ShardAllocation(conf *cfg.Config, index string) error {
table.Entries = [][]any{ table.Entries = [][]any{
{"Index", index}, {"Index", index},
{"Current state", res.CurrentState}, {"Current state", res.CurrentState},
{"Can rebalance cluster", res.CanRebalanceCluster.Name},
{"Can rebalance to another node", res.CanRebalanceToOtherNode.Name},
{"Can remain on current node", res.CanRemainOnCurrentNode.Name},
}
if currentNode != nil {
table.Entries = append(table.Entries, [][]any{
{"Current node", currentNode.Name}, {"Current node", currentNode.Name},
{"Current k8s node", currentNode.Attributes["k8s_node_name"]}, {"Current k8s node", currentNode.Attributes["k8s_node_name"]},
{"Current node address", currentNode.TransportAddress}, {"Current node address", currentNode.TransportAddress},
{"Current node id", currentNode.Id}, {"Current node id", currentNode.Id},
{"Current node weight", currentNode.WeightRanking}, {"Current node weight", currentNode.WeightRanking},
{"Current node roles", roles}, {"Current node roles", roles},
{"Can rebalance cluster", res.CanRebalanceCluster.Name}, }...)
{"Can rebalance to another node", res.CanRebalanceToOtherNode.Name}, } else {
{"Can remain on current node", res.CanRemainOnCurrentNode.Name}, table.AddRow("Current node", "not currently assigned to any node")
} }
if res.CurrentState == "unassigned" { if res.CurrentState == "unassigned" {