Currently, `TransportGetShutdownStatusAction` is executed in a transport thread, this action can do a substantial amount of work (O(# shards) in some cases) in the transport thread preventing pending transport tasks to make progress and potentially causing cluster instability. This action should be dispatched into a different thread pool to avoid such issues.
x-pack/plugin/shutdown/src/test/java/org/elasticsearch/xpack/shutdown/TransportGetShutdownStatusActionTests.java
checkStalledShardWithIlmState(
            executionState,
            randomFrom(OperationMode.STOPPING, OperationMode.RUNNING),
            SingleNodeShutdownMetadata.Status.STALLED
        );
    }
    public void testIlmInAnyOtherActionDoesNotAvoidStall() {
        Set<String> allOtherIlmActions = new HashSet<>();
        allOtherIlmActions.addAll(TimeseriesLifecycleType.ORDERED_VALID_HOT_ACTIONS);
        allOtherIlmActions.addAll(TimeseriesLifecycleType.ORDERED_VALID_WARM_ACTIONS);
        allOtherIlmActions.addAll(TimeseriesLifecycleType.ORDERED_VALID_COLD_ACTIONS);
        allOtherIlmActions.addAll(TimeseriesLifecycleType.ORDERED_VALID_FROZEN_ACTIONS);
        allOtherIlmActions.addAll(TimeseriesLifecycleType.ORDERED_VALID_DELETE_ACTIONS);
        allOtherIlmActions.remove(ShrinkAction.NAME);
        for (String action : allOtherIlmActions) {
            LifecycleExecutionState executionState = LifecycleExecutionState.builder().setAction(action).build();
            checkStalledShardWithIlmState(
                executionState,
                randomFrom(OperationMode.STOPPING, OperationMode.RUNNING),
                SingleNodeShutdownMetadata.Status.STALLED
            );
        }
    }
    private void checkStalledShardWithIlmState(
        LifecycleExecutionState executionState,
        OperationMode operationMode,
        SingleNodeShutdownMetadata.Status expectedStatus
    ) {
        Index index = new Index(randomAlphaOfLength(5), randomAlphaOfLengthBetween(1, 20));
        IndexMetadata imd = IndexMetadata.builder(generateIndexMetadata(index, 3, 0))