# Curator Reindex error

**URL:** https://discuss.elastic.co/t/curator-reindex-error/151120
**Category:** Elasticsearch
**Created:** [October 4, 2018, 8:32pm UTC](https://discuss.elastic.co/t/curator-reindex-error/151120 "2018-10-04T20:32:14Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![JimP](https://avatars.discourse-cdn.com/v4/letter/j/8baadc/32.png) [@JimP](https://discuss.elastic.co/u/JimP)
#### Post date: [October 4, 2018, 8:32pm UTC](https://discuss.elastic.co/t/curator-reindex-error/151120/1 "2018-10-04T20:32:14Z")

</div>

I'm using painless in my reindex to create the new index name from xxxxx-yyyy.mm.dd to xxxxx-yyyy.mm.dd-ro, and I get the error that the post run quick check failed. I didn't know how to name the destination index without painless, but the dest.index: was required, so I put a made up value.

Am I over-complicating this by using painless? If not, any suggestions on how to fix this, please?

Curator v5.5.4  
Elasticsearch v6.3.2

Log:

```
2018-10-04 00:28:13,199 INFO curator.utils task_check:1653 Task "reindex from [xim.ro.main.log-2018.10.03, xim.ro.uat.log-2018.10.03, xlm.dms.sta.winlog-2018.10.03, xim.ro.qa2.log-2018.10.03, xim.ro.qa.log-2018.10.03, xlm.dms.int.winlog-2018.10.03, xlm.dms.dev.log-2018.10.03, xlm.lmx.dev.ljk-2018.10.03, xlm.dms.int.log-2018.10.03, xlm.lmx.perf.ljk-2018.10.03, xlm.dms.sta.iis-2018.10.03, xlm.dms.sta.log-2018.10.03, xlm.lmx.sta.ljk-2018.10.03] updated with Script{type=inline, lang='painless', idOrCode='ctx._index = ctx._index + '-ro'', options={}, params={}} to [creatingreadonly]" completed at 2018-10-04T00:28:12Z.
2018-10-04 00:28:13,199 DEBUG curator.utils wait_for_it:1754 Response: True
2018-10-04 00:28:13,199 DEBUG curator.utils wait_for_it:1759 Action "reindex" finished executing (may or may not have been successful)
2018-10-04 00:28:13,199 DEBUG curator.utils wait_for_it:1777 Result: True
2018-10-04 00:28:13,205 ERROR curator.actions.reindex _post_run_quick_check:1291 The index described as "creatingreadonly" was not found after the reindex operation. Check Elasticsearch logs for more information.
2018-10-04 00:28:13,205 ERROR curator.cli run:186 Failed to complete action: reindex. <class 'curator.exceptions.FailedExecution'>: Exception encountered. Rerun with loglevel DEBUG and/or check Elasticsearch logs for more information. Exception: Reindex failed. The index or alias identified by "creatingreadonly" was not found.

```

Curator action:

```
2:
  action: reindex
  description: "Perform a reindex on selected indices to change shards and replicas for readonly"
  options:
    timeout_override: 144000
    max_wait: 288000
    wait_interval: 30
    wait_for_completion: true
    ignore_empty_list: true
    continue_if_exception: false
    disable_action: false

    request_body:
      source:
        index: REINDEX_SELECTION
      dest:
        index: 'creatingreadonly'
      script:
        lang: painless
        source: ctx._index = ctx._index + '-ro'

  filters:

  - filtertype: pattern
    kind: regex
    value: '^[a-zA-Z].+[0-9]{4}.[0-9]{2}.[0-9]{2}$'
    exclude:

  - filtertype: period
    period_type: relative
    source: name
    range_from: -1
    range_to: -1
    timestring: '%Y.%m.%d'
    unit: days

```

(edit: added curator and elasticsearch version above)

---

<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: [October 5, 2018, 10:20am UTC](https://discuss.elastic.co/t/curator-reindex-error/151120/2 "2018-10-05T10:20:33Z")

</div>

If you were using `MIGRATION`, I would have suggested using `migration_suffix`. But since you’re using `REINDEX_SELECTION`, then painless is the only easy way to rename each index.

---

<div class="post-metadata">

### Author: ![JimP](https://avatars.discourse-cdn.com/v4/letter/j/8baadc/32.png) [@JimP](https://discuss.elastic.co/u/JimP)
#### Post date: [October 10, 2018, 2:45pm UTC](https://discuss.elastic.co/t/curator-reindex-error/151120/3 "2018-10-10T14:45:43Z")

</div>

I would use `MIGRATION` if I could use some kind of wild card for the source index name, to get all of the indexes?

Since I am using `REINDEX_SELECTION` and `painless`, is there a way to prevent this error? If not, then I'll have to arrange the order of my "actions" to have this run last. Plus, I'm losing the Quick Check validation.

---

<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: [October 10, 2018, 3:36pm UTC](https://discuss.elastic.co/t/curator-reindex-error/151120/4 "2018-10-10T15:36:12Z")

</div>

🤦‍♂️ My bad. My travel-worn, tired brain missed something big here, and that is that `MIGRATION` is not limited to remote reindex. In other words, you should be able to use `MIGRATION` in conjunction with `REINDEX_SELECTION`, no problem:

```auto
2:
  action: reindex
  description: "Perform a reindex on selected indices to change shards and replicas for readonly"
  options:
    timeout_override: 144000
    max_wait: 288000
    wait_interval: 30
    wait_for_completion: true
    ignore_empty_list: true
    migration_suffix: "-ro"
    request_body:
      source:
        index: REINDEX_SELECTION
      dest:
        index: MIGRATION
  filters:
  - filtertype: pattern
    kind: regex
    value: '^[a-zA-Z].+[0-9]{4}.[0-9]{2}.[0-9]{2}$'
    exclude:
  - filtertype: period
    period_type: relative
    source: name
    range_from: -1
    range_to: -1
    timestring: '%Y.%m.%d'
    unit: days

```

---

<div class="post-metadata">

### Author: ![JimP](https://avatars.discourse-cdn.com/v4/letter/j/8baadc/32.png) [@JimP](https://discuss.elastic.co/u/JimP)
#### Post date: [October 10, 2018, 4:31pm UTC](https://discuss.elastic.co/t/curator-reindex-error/151120/5 "2018-10-10T16:31:31Z")

</div>

Awesome, thanks!! I've made the changes for tonight and will confirm in the morning.

---

<div class="post-metadata">

### Author: ![JimP](https://avatars.discourse-cdn.com/v4/letter/j/8baadc/32.png) [@JimP](https://discuss.elastic.co/u/JimP)
#### Post date: [October 11, 2018, 7:46pm UTC](https://discuss.elastic.co/t/curator-reindex-error/151120/6 "2018-10-11T19:46:21Z")

</div>

@theuntergeek,

That did it, thanks!

---

<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: [November 8, 2018, 7:46pm UTC](https://discuss.elastic.co/t/curator-reindex-error/151120/7 "2018-11-08T19:46:22Z")

</div>

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