# Index is not actionable in curator shrink

**URL:** <https://discuss.elastic.co/t/index-is-not-actionable-in-curator-shrink/220105>\
**Category:** Elasticsearch\
**Tags:** curator\
**Created:** [February 20, 2020, 7:04am UTC](https://discuss.elastic.co/t/index-is-not-actionable-in-curator-shrink/220105 "2020-02-20T07:04:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ramazan\_dd](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ramazan_dd/32/50393_2.png) [@Ramazan\_dd](https://discuss.elastic.co/u/Ramazan_dd)\
**Post date:** [February 20, 2020, 7:04am UTC](https://discuss.elastic.co/t/index-is-not-actionable-in-curator-shrink/220105/1 "2020-02-20T07:04:37Z")

</div>

Hello, I need to archive file in order to shrink size of index which older than 1 day, also delete index. Now my delete\_indeces action works well, shrink action doesn`t. My index status is green now. What i should do?  
Here is my file action\_file.yml

```
actions:
  1:
    action: shrink
    description: >-
      Shrink indices older than 1 days 
    options:
      allow_ilm_indices: True
      disable_action: False
      ignore_empty_list: False
      continue_if_exception: False
      shrink_node: DETERMINISTIC
      node_filters:
        permit_masters: False
        exclude_nodes: ['not_this_node']
      number_of_shards: 1
      number_of_replicas: 1
      shrink_prefix:
      shrink_suffix: '-shrink'
      delete_after: true
      post_allocation:
        allocation_type: include
        key: node_tag
        value: cold
      wait_for_active_shards: 1
      extra_settings:
        settings:
          index.codec: best_compression
      wait_for_completion: True
      wait_for_rebalance: True
      wait_interval: 9
      max_wait: -1
    filters:
      - filtertype: pattern
        kind: prefix
        value: mpayara-203-
      - filtertype: age
        source: name
        direction: older
        timestring: '%Y.%m.%d'
        unit: days
        unit_count: 1

```

And this is my logs

```
2020-02-20 06:42:15,858 DEBUG curator.indexlist empty_list_check:226 Checking for empty list

2020-02-20 06:42:15,858 DEBUG curator.utils get_date_regex:195 regex = \d{4}\.\d{2}\.\d{2}

2020-02-20 06:42:15,859 DEBUG curator.indexlist working_list:237 Generating working list of indices

2020-02-20 06:42:15,866 DEBUG curator.indexlist working_list:237 Generating working list of indices

2020-02-20 06:42:15,866 DEBUG curator.indexlist __actionable:35 Index mpayara-203-2020.02.16 is actionable and remains in the list.

2020-02-20 06:42:15,866 DEBUG curator.indexlist __excludify:58 Remains in actionable list: Index "mpayara-203-2020.02.16" age (1581811200), direction: "older", point of reference, (1582094535)

2020-02-20 06:42:15,866 DEBUG curator.indexlist iterate_filters:1238 Post-instance: ['mpayara-203-2020.02.16']

2020-02-20 06:42:15,866 DEBUG curator.actions.shrink _merge_extra_settings:1896 Adding extra_settings to shrink body: {'settings': {'index.codec': 'best_compression'}}

2020-02-20 06:42:15,866 DEBUG curator.cli process_action:99 Doing the action here.

2020-02-20 06:42:15,866 DEBUG curator.indexlist filter_closed:717 Filtering closed indices

2020-02-20 06:42:15,866 DEBUG curator.indexlist empty_list_check:226 Checking for empty list

2020-02-20 06:42:15,866 DEBUG curator.indexlist working_list:237 Generating working list of indices

2020-02-20 06:42:15,867 DEBUG curator.indexlist filter_closed:722 Index mpayara-203-2020.02.16 state: open

2020-02-20 06:42:15,867 DEBUG curator.indexlist __actionable:35 Index mpayara-203-2020.02.16 is actionable and remains in the list.

2020-02-20 06:42:15,867 DEBUG curator.indexlist filter_by_shards:1013 Filtering indices by number of shards

2020-02-20 06:42:15,867 DEBUG curator.indexlist empty_list_check:226 Checking for empty list

2020-02-20 06:42:15,867 DEBUG curator.indexlist working_list:237 Generating working list of indices

2020-02-20 06:42:15,867 DEBUG curator.indexlist filter_by_shards:1031 Filter by number of shards: Index: mpayara-203-2020.02.16

2020-02-20 06:42:15,867 DEBUG curator.indexlist __not_actionable:39 Index mpayara-203-2020.02.16 is not actionable, removing from list.

2020-02-20 06:42:15,867 DEBUG curator.indexlist empty_list_check:226 Checking for empty list

2020-02-20 06:42:15,867 ERROR curator.cli run:185 Unable to complete action "shrink". No actionable items in list: <class 'curator.exceptions.NoIndices'>

/usr/local/lib/python3.6/site-packages/curator/utils.py:53: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.

  return yaml.load(read_file(path))
```

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [February 20, 2020, 7:33am UTC](https://discuss.elastic.co/t/index-is-not-actionable-in-curator-shrink/220105/2 "2020-02-20T07:33:34Z")

</div>

`No actionable items in list:` is the message returned. It means that no indices were left to act on after all filters were applied.

In the logs you've provided, it appears that this is what happened:

```auto
Filter by number of shards: Index: mpayara-203-2020.02.16
Index mpayara-203-2020.02.16 is not actionable, removing from list.

```

This suggests that the index `mpayara-203-2020.02.16` already has only 1 shard (though it does not say how many it actually has), so it removes it from the actionable list.

> [@Ramazan\_dd](#):
>
> Hello, I need to archive file in order to shrink size of index which older than 1 day

[The shrink index API](https://www.elastic.co/guide/en/elasticsearch/reference/7.6/indices-shrink-index.html) doesn't compress or reduce the size of an index. It reduces the number of shards in an index, while the size remains the same. The `shrink` action in Curator can change to `best_compression` as part of its flow, but only for an index that has more than 1 shard.

The only way to get the `best_compression` codec for an index that already only has a single shard would be to close the index, apply the `best_compression` setting, re-open the index, and trigger a force\_merge. Even after these steps, the amount of size reduced using `best_compression` may not be significant (perhaps shrinking only a few percent, though in some cases it might be more), and the amount of CPU and disk I/O to accomplish a re-compression will vary, but could slow down other operations on the node(s) hosting the shard(s) to re-compress.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 19, 2020, 7:33am UTC](https://discuss.elastic.co/t/index-is-not-actionable-in-curator-shrink/220105/3 "2020-03-19T07:33:38Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
