When ILM's Shrink action attempts to choose a node to hold a copy of all shards in an index prior to a Shrink, but cannot find any suitable nodes (because, for example, no nodes satisfy the existing allocation requirements), it will not retry until a new master node is elected.
This is because SetSingleNodeAllocateStep is an AsyncActionStep, which is designed to be run only once. However, because it might fail if there are no suitable nodes available, it ought to retry whenever there is reason to believe the situation might have changed. This could be done in a way similar to AsyncRetryDuringSnapshotActionStep, where a cluster state listener is registered so that the step will be retried after a cluster state update.