# Shrink action says "There are no available nodes to move to to execute a shrink" but there are qualifying nodes

**URL:** <https://forum.opensearch.org/t/shrink-action-says-there-are-no-available-nodes-to-move-to-to-execute-a-shrink-but-there-are-qualifying-nodes/10104>\
**Category:** Index Management\
**Created:** [June 28, 2022, 4:54pm UTC](https://forum.opensearch.org/t/shrink-action-says-there-are-no-available-nodes-to-move-to-to-execute-a-shrink-but-there-are-qualifying-nodes/10104 "2022-06-28T16:54:11Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![searchspark2310](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@searchspark2310](https://forum.opensearch.org/u/searchspark2310)\
**Post date:** [June 28, 2022, 4:54pm UTC](https://forum.opensearch.org/t/shrink-action-says-there-are-no-available-nodes-to-move-to-to-execute-a-shrink-but-there-are-qualifying-nodes/10104/1 "2022-06-28T16:54:11Z")

</div>

Whenever I try to perform a shrink operation on an index using ISM I always get the error " There are no available nodes to move to to execute a shrink. Delaying until node becomes available." I’ve 2x-checked my nodes and they have way more than ample space to hold the 2x-shard size required to perform a shrink.

I’ve tried this on a non-monolithic cluster (dedicated data nodes, coord-nodes, master-node, warm-nodes) and also on a simple 4-node cluster where all nodes are performing all of the duties and I’m getting the same error.

I’ve looked through the kotlin code and all logic seems correct and I can’t find any glaring logic bugs. I’ve also looked through the doco to make sure that all prerequisites are being met. What am I doing wrong? Has anyone else gotten the shrink ISM operation to work correctly?

---

<div class="post-metadata">

**Author:** ![searchspark2310](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@searchspark2310](https://forum.opensearch.org/u/searchspark2310)\
**Post date:** [July 6, 2022, 5:07pm UTC](https://forum.opensearch.org/t/shrink-action-says-there-are-no-available-nodes-to-move-to-to-execute-a-shrink-but-there-are-qualifying-nodes/10104/2 "2022-07-06T17:07:54Z")

</div>

I am curious if anyone else has been able to get the Shrink operation working correctly. And if so, how they set it up.

---

<div class="post-metadata">

**Author:** ![searchspark2310](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@searchspark2310](https://forum.opensearch.org/u/searchspark2310)\
**Post date:** [July 18, 2022, 4:04pm UTC](https://forum.opensearch.org/t/shrink-action-says-there-are-no-available-nodes-to-move-to-to-execute-a-shrink-but-there-are-qualifying-nodes/10104/3 "2022-07-18T16:04:21Z")

</div>

I believe I’ve discovered a bug in the ISM Shrink action code that is causing this problem. I created a bug report here: [https://github.com/opensearch-project/index-management/issues/417](https://github.com/opensearch-project/index-management/issues/417) . I’m not a Kotlin dev so I’m having problems getting the integration tests to complete. Would welcome anyone’s help if they can so I can make a PR/MR to get this fixed.

---

<div class="post-metadata">

**Author:** ![searchspark2310](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@searchspark2310](https://forum.opensearch.org/u/searchspark2310)\
**Post date:** [July 19, 2022, 4:00pm UTC](https://forum.opensearch.org/t/shrink-action-says-there-are-no-available-nodes-to-move-to-to-execute-a-shrink-but-there-are-qualifying-nodes/10104/4 "2022-07-19T16:00:43Z")

</div>

Bug and fix confirmed. PR created here: [https://github.com/opensearch-project/index-management/pull/418](https://github.com/opensearch-project/index-management/pull/418) .

---

<div class="post-metadata">

**Author:** ![fgento](https://avatars.discourse-cdn.com/v4/letter/f/d78d45/32.png) [@fgento](https://forum.opensearch.org/u/fgento)\
**Post date:** [August 12, 2022, 12:06pm UTC](https://forum.opensearch.org/t/shrink-action-says-there-are-no-available-nodes-to-move-to-to-execute-a-shrink-but-there-are-qualifying-nodes/10104/5 "2022-08-12T12:06:01Z")

</div>

Hi,  
anyone managed to get it working? I just updated to Opensearch 2.2.0 and I’m still getting the same error.  
I deployed it on a Kubernetes cluster with 3 data nodes and 30GB PVC for the data mountpoints

```auto
$ curl localhost:9200/_cat/allocation?v
shards disk.indices disk.used disk.avail disk.total disk.percent host ip node
    79 469.9mb 733.5mb 28.6gb 29.4gb 2 10.39.23.27 10.39.23.27 opensearch-data-0
    83 672.3mb 1006.6mb 28.4gb 29.4gb 3 10.39.17.161 10.39.17.161 opensearch-data-2
    33 603.2mb 778.3mb 28.6gb 29.4gb 2 10.39.26.25 10.39.26.25 opensearch-data-1
     9 UNASSIGNED

```

---

<div class="post-metadata">

**Author:** ![juv](https://avatars.discourse-cdn.com/v4/letter/j/b3f665/32.png) [@juv](https://forum.opensearch.org/u/juv)\
**Post date:** [August 21, 2022, 8:31am UTC](https://forum.opensearch.org/t/shrink-action-says-there-are-no-available-nodes-to-move-to-to-execute-a-shrink-but-there-are-qualifying-nodes/10104/6 "2022-08-21T08:31:42Z")

</div>

verified on 2.2.0 - shrink does work.

---

<div class="post-metadata">

**Author:** ![fgento](https://avatars.discourse-cdn.com/v4/letter/f/d78d45/32.png) [@fgento](https://forum.opensearch.org/u/fgento)\
**Post date:** [September 8, 2022, 7:38am UTC](https://forum.opensearch.org/t/shrink-action-says-there-are-no-available-nodes-to-move-to-to-execute-a-shrink-but-there-are-qualifying-nodes/10104/7 "2022-09-08T07:38:29Z")

</div>

can you show me how does your policy look, please? maybe I’m doing something wrong
