Skip to content

Commit 0c44459

Browse files
authored
Improve CANNOT_REBALANCE_CAN_ALLOCATE explanation (#104904) (#104910)
Clarify that in this situation there is a rebalancing move that would improve the cluster balance, but there's some reason why rebalancing is not happening. Also points at the `can_rebalance_cluster_decisions` as well as the node-by-node decisions since the action needed could be described in either place.
1 parent 4dc7d46 commit 0c44459

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

docs/changelog/104904.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 104904
2+
summary: Improve `CANNOT_REBALANCE_CAN_ALLOCATE` explanation
3+
area: Allocation
4+
type: bug
5+
issues: []

server/src/main/java/org/elasticsearch/cluster/routing/allocation/Explanations.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,11 @@ public static final class Rebalance {
7979
activities. The shard will be rebalanced when those activities finish. Please wait.""";
8080

8181
public static final String CANNOT_REBALANCE_CAN_ALLOCATE = """
82-
Elasticsearch is allowed to allocate this shard to another node but it isn't allowed to rebalance the shard there. If you \
83-
expect this shard to be rebalanced to another node, find this node in the node-by-node explanation and address the reasons \
84-
which prevent Elasticsearch from rebalancing this shard there.""";
82+
Elasticsearch is allowed to allocate this shard on another node, and there is at least one node to which it could move this \
83+
shard that would improve the overall cluster balance, but it isn't allowed to rebalance this shard there. If you expect this \
84+
shard to be rebalanced to another node, check the cluster-wide rebalancing decisions and address any reasons preventing \
85+
Elasticsearch from rebalancing shards within the cluster, and then find the expected node in the node-by-node explanation and \
86+
address the reasons which prevent Elasticsearch from moving this shard there.""";
8587

8688
public static final String CANNOT_REBALANCE_CANNOT_ALLOCATE = """
8789
Elasticsearch is not allowed to allocate or rebalance this shard to another node. If you expect this shard to be rebalanced to \

0 commit comments

Comments
 (0)