# Elasticsearch version in Rally benchmark-only

**URL:** <https://discuss.elastic.co/t/elasticsearch-version-in-rally-benchmark-only/84096>\
**Category:** Elasticsearch\
**Tags:** rally\
**Created:** [April 29, 2017, 8:23pm UTC](https://discuss.elastic.co/t/elasticsearch-version-in-rally-benchmark-only/84096 "2017-04-29T20:23:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![salazar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/salazar/32/14740_2.png) [@salazar](https://discuss.elastic.co/u/salazar)\
**Post date:** [April 29, 2017, 8:23pm UTC](https://discuss.elastic.co/t/elasticsearch-version-in-rally-benchmark-only/84096/1 "2017-04-29T20:23:12Z")

</div>

Hi folks,

Suppose I want to benchmark an existing cluster, whose Elasticsearch version is 2.x. If I use "--pipeline=benchmark-only --target-hosts=...", will Rally detect the Elasticsearch version and checkout the appropriate tracks branch? In order to test it, I forked the official tracks repository and deleted the branch 2, hoping that the run would fail, but it didn't. In pipeline 'from-distribution', on the other hand, the version can be specified.

Cheers,  
G. Salazar

---

<div class="post-metadata">

**Author:** ![danielmitterdorfer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielmitterdorfer/32/110510_2.png) [@danielmitterdorfer](https://discuss.elastic.co/u/danielmitterdorfer)\
**Post date:** [May 2, 2017, 6:20am UTC](https://discuss.elastic.co/t/elasticsearch-version-in-rally-benchmark-only/84096/2 "2017-05-02T06:20:00Z")

</div>

Hi @salazar,

> [@salazar](#):
>
> will Rally detect the Elasticsearch version and checkout the appropriate tracks branch?

Yes, it will. It checks `$ES_HOST:$ES_PORT/` (e.g. [http://localhost:9200/](http://localhost:9200/)) to detect the distribution version. Rally will then choose the most appropriate version of a track (for details see the [rally-tracks README](https://github.com/elastic/rally-tracks#versioning-scheme)). In your case, it would checkout branch `2`.

> [@salazar](#):
>
> In order to test it, I forked the official tracks repository and deleted the branch 2, hoping that the run would fail, but it didn't.

Am I right that you did do `git branch -D 2`? If yes, that won't help. Rally will fetch from the remote and simply checkout the branch again. You can also see this in the logs. Here is what happens on my machine when I delete the branch `2`, start Elasticsearch 2.4.0 and run `esrally --pipeline=benchmark-only`:

```auto
2017-05-02 06:07:40,52 rally.launcher INFO Distribution version was not specified by user. Rally-determined version is [2.4.0]
2017-05-02 06:07:40,91 rally.racecontrol INFO Mechanic has started engine successfully.
2017-05-02 06:07:40,91 rally.racecontrol INFO Reloading track based for distribution version [2.4.0]
2017-05-02 06:07:40,802 rally.track INFO Checking out [2] in [/Users/daniel/.rally/benchmarks/tracks/default] for distribution version [2.4.0].
2017-05-02 06:07:40,813 rally.track INFO Rebasing on [2] in [/Users/daniel/.rally/benchmarks/tracks/default] for distribution version [2.4.0].
2017-05-02 06:07:40,914 rally.track INFO Reading track specification file [/Users/daniel/.rally/benchmarks/tracks/default/geonames/track.json].

```

As you can see from the first message, Rally automatically detected the distribution version and then just checked out the branch again. If you do everything identically but start Rally with `esrally --pipeline=benchmark-only --offline` this will prevent Rally from fetching remote branches:

```auto
2017-05-02 06:15:09,629 rally.launcher INFO Distribution version was not specified by user. Rally-determined version is [2.4.0]
2017-05-02 06:15:09,638 rally.racecontrol INFO Mechanic has started engine successfully.
2017-05-02 06:15:09,638 rally.racecontrol INFO Reloading track based for distribution version [2.4.0]
2017-05-02 06:15:09,646 rally.track INFO Checking out [master] in [/Users/daniel/.rally/benchmarks/tracks/default] for distribution version [2.4.0].
2017-05-02 06:15:09,655 rally.track INFO Reading track specification file [/Users/daniel/.rally/benchmarks/tracks/default/geonames/track.json].

```

As you can see, it checks out the master branch and later on the benchmark will fail.

By the way, you can also specify `--distribution-version` with the `benchmark-only` pipeline. This will override Rally's autodetection mechanism but usually you don't need that.

Daniel

---

<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:** [May 30, 2017, 6:22am UTC](https://discuss.elastic.co/t/elasticsearch-version-in-rally-benchmark-only/84096/3 "2017-05-30T06:22:01Z")

</div>

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