Add dedicated step for checking shrink allocation status#35161
Add dedicated step for checking shrink allocation status#35161dakrone merged 6 commits intoelastic:masterfrom
Conversation
This adds a new step for checking whether an index is allocated correctly based on the rules added prior to running the shrink step. It also fixes a bug where for shrink we are not allowed to have the shards relocating for the shrink step. Resolves elastic#34938
|
Pinging @elastic/es-core-infra |
…rink-allocation-check
…rink-allocation-check
| boolean canRemainOnCurrentNode = ALLOCATION_DECIDERS | ||
| .canRemain(shardRouting, clusterState.getRoutingNodes().node(currentNodeId), allocation) | ||
| .type() == Decision.Type.YES; | ||
| if (canRemainOnCurrentNode == false) { |
There was a problem hiding this comment.
We need to add a check for the shard being started here too otherwise we will end up with the same issue on the allocate action but it will be harder to diagnose
There was a problem hiding this comment.
I'd like to address that in a separate PR, since I think it warrants more testing for the full ramifications, would that be okay with you?
There was a problem hiding this comment.
ok, could you create an issue so we can track the extra work and it doesn't get missed?
colings86
left a comment
There was a problem hiding this comment.
LGTM when the issue for the extra work is created
| boolean canRemainOnCurrentNode = ALLOCATION_DECIDERS | ||
| .canRemain(shardRouting, clusterState.getRoutingNodes().node(currentNodeId), allocation) | ||
| .type() == Decision.Type.YES; | ||
| if (canRemainOnCurrentNode == false) { |
There was a problem hiding this comment.
ok, could you create an issue so we can track the extra work and it doesn't get missed?
This adds a new step for checking whether an index is allocated correctly based on the rules added prior to running the shrink step. It also fixes a bug where for shrink we are not allowed to have the shards relocating for the shrink step. This also allows us to simplify AllocationRoutedStep and provide better feedback in the step info for why either the allocation or the shrink checks have failed. Resolves #34938
This is a follow-up from elastic#35161 where we now check for started and relocating state in `AllocationRoutedStep`. Resolves elastic#35258
…tic#35316) * [ILM] Check shard and relocation status in AllocationRoutedStep This is a follow-up from elastic#35161 where we now check for started and relocating state in `AllocationRoutedStep`. Resolves elastic#35258
This adds a new step for checking whether an index is allocated correctly based
on the rules added prior to running the shrink step. It also fixes a bug where
for shrink we are not allowed to have the shards relocating for the shrink step.
This also allows us to simplify AllocationRoutedStep and provide better
feedback in the step info for why either the allocation or the shrink checks
have failed.
Resolves #34938