# Failure in create-index operation doesn't create error

**URL:** <https://discuss.elastic.co/t/failure-in-create-index-operation-doesnt-create-error/213115>\
**Category:** Elasticsearch\
**Tags:** rally\
**Created:** [December 27, 2019, 1:24am UTC](https://discuss.elastic.co/t/failure-in-create-index-operation-doesnt-create-error/213115 "2019-12-27T01:24:16Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![nickcanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nickcanz/32/44873_2.png) [@nickcanz](https://discuss.elastic.co/u/nickcanz)\
**Post date:** [December 27, 2019, 1:24am UTC](https://discuss.elastic.co/t/failure-in-create-index-operation-doesnt-create-error/213115/1 "2019-12-27T01:24:16Z")

</div>

Hi!

I was creating a custom track and accidentally specified invalid index settings. My problem is that esrally happily continued on and didn't produce any output that alerted me to this fact and I was just confused that my index was getting created improperly.

I eventually found a log line that produced a WARNING, but I was wondering if there was an option/flag so that esrally would create an error when a step fails.

```auto
2019-12-27 01:16:18,878 -not-actor-/PID:84505 elasticsearch WARNING PUT http://localhost:9200/bad-track [status:400 request:0.016s]

```

Is it expected that the `create-index` operation doesn't fail on error?

---

<div class="post-metadata">

**Author:** ![dliappis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dliappis/32/56174_2.png) [@dliappis](https://discuss.elastic.co/u/dliappis)\
**Post date:** [December 30, 2019, 8:12am UTC](https://discuss.elastic.co/t/failure-in-create-index-operation-doesnt-create-error/213115/2 "2019-12-30T08:12:30Z")

</div>

Hello,

The default behavior of Rally is to continue on error. See [rally#791](https://github.com/elastic/rally/issues/791#issuecomment-567022803) for the reasoning.

You can use the command line parameter [--on-error=abort](https://esrally.readthedocs.io/en/stable/command_line_reference.html#on-error) to achieve what you are after.

Dimitris

---

<div class="post-metadata">

**Author:** ![nickcanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nickcanz/32/44873_2.png) [@nickcanz](https://discuss.elastic.co/u/nickcanz)\
**Post date:** [January 1, 2020, 9:32pm UTC](https://discuss.elastic.co/t/failure-in-create-index-operation-doesnt-create-error/213115/3 "2020-01-01T21:32:03Z")

</div>

Thanks for the explanation!

---

<div class="post-metadata">

**Author:** ![nickcanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nickcanz/32/44873_2.png) [@nickcanz](https://discuss.elastic.co/u/nickcanz)\
**Post date:** [January 2, 2020, 2:51am UTC](https://discuss.elastic.co/t/failure-in-create-index-operation-doesnt-create-error/213115/4 "2020-01-02T02:51:09Z")

</div>

@dliappis following up, is there a way for a track to specify an `on-error` behavior per operation? Or just for the whole track? For example, like the reasoning you linked to, an error for indexing is "data" but an error for index creation invalidates the track.

---

<div class="post-metadata">

**Author:** ![dliappis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dliappis/32/56174_2.png) [@dliappis](https://discuss.elastic.co/u/dliappis)\
**Post date:** [January 2, 2020, 8:12am UTC](https://discuss.elastic.co/t/failure-in-create-index-operation-doesnt-create-error/213115/5 "2020-01-02T08:12:03Z")

</div>

> [@nickcanz](#):
>
> @dliappis following up, is there a way for a track to specify an `on-error` behavior per operation? Or just for the whole track?

Currently not, the cli flag `--on-error` controls this behavior throughout the entire execution of the track.

---

<div class="post-metadata">

**Author:** ![nickcanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nickcanz/32/44873_2.png) [@nickcanz](https://discuss.elastic.co/u/nickcanz)\
**Post date:** [January 2, 2020, 1:12pm UTC](https://discuss.elastic.co/t/failure-in-create-index-operation-doesnt-create-error/213115/6 "2020-01-02T13:12:02Z")

</div>

Gotcha, 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:** [January 30, 2020, 1:17pm UTC](https://discuss.elastic.co/t/failure-in-create-index-operation-doesnt-create-error/213115/7 "2020-01-30T13:17:59Z")

</div>

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