mirror of
https://codeberg.org/scip/esctl.git
synced 2026-08-24 10:04:18 +02:00
fix #84
This commit is contained in:
@@ -176,17 +176,24 @@ 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},
|
||||||
{"Current node", currentNode.Name},
|
|
||||||
{"Current k8s node", currentNode.Attributes["k8s_node_name"]},
|
|
||||||
{"Current node address", currentNode.TransportAddress},
|
|
||||||
{"Current node id", currentNode.Id},
|
|
||||||
{"Current node weight", currentNode.WeightRanking},
|
|
||||||
{"Current node roles", roles},
|
|
||||||
{"Can rebalance cluster", res.CanRebalanceCluster.Name},
|
{"Can rebalance cluster", res.CanRebalanceCluster.Name},
|
||||||
{"Can rebalance to another node", res.CanRebalanceToOtherNode.Name},
|
{"Can rebalance to another node", res.CanRebalanceToOtherNode.Name},
|
||||||
{"Can remain on current node", res.CanRemainOnCurrentNode.Name},
|
{"Can remain on current node", res.CanRemainOnCurrentNode.Name},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if currentNode != nil {
|
||||||
|
table.Entries = append(table.Entries, [][]any{
|
||||||
|
{"Current node", currentNode.Name},
|
||||||
|
{"Current k8s node", currentNode.Attributes["k8s_node_name"]},
|
||||||
|
{"Current node address", currentNode.TransportAddress},
|
||||||
|
{"Current node id", currentNode.Id},
|
||||||
|
{"Current node weight", currentNode.WeightRanking},
|
||||||
|
{"Current node roles", roles},
|
||||||
|
}...)
|
||||||
|
} else {
|
||||||
|
table.AddRow("Current node", "not currently assigned to any node")
|
||||||
|
}
|
||||||
|
|
||||||
if res.CurrentState == "unassigned" {
|
if res.CurrentState == "unassigned" {
|
||||||
table.AddRow("Unassignment reason", res.UnassignedInfo.Reason.String()+" at "+res.UnassignedInfo.At.(string))
|
table.AddRow("Unassignment reason", res.UnassignedInfo.Reason.String()+" at "+res.UnassignedInfo.At.(string))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user