Must be a git repository

When I run esrally
/root/.rally/benchmarks/tracks/custom] must be a git repository
But

~/.rally/benchmarks/tracks/custom# git status
On branch master
Changes not staged for commit:

Log is:


    return race(cfg, external=True)
  File "/usr/local/lib/python3.5/dist-packages/esrally/racecontrol.py", line 279, in race
    raise exceptions.RallyError(result.message, result.cause)
esrally.exceptions.RallyError: ('Error in track preparator', [/root/.rally/benchmarks/tracks/custom] must be a git repository.

Please run:
git -C /root/.rally/benchmarks/tracks/custom init)
2018-08-09 22:19:17,967 ActorAddr-(T|:21129)/PID:6197 esrally.actor INFO BenchmarkActor received unknown message [ActorExitRequest] (ignoring).
2018-08-09 22:19:17,962 ActorAddr-(T|:26823)/PID:6198 esrally.mechanic.telemetry WARNING merges_total_time is 143037183 ms indicating that the cluster is not in a defined clean state. Recorded index time metrics may be misleading.
2018-08-09 22:19:17,969 ActorAddr-(T|:26823)/PID:6198 esrally.mechanic.telemetry WARNING merges_total_throttled_time is 51037420 ms indicating that the cluster is not in a defined clean state. Recorded index time metrics may be misleading.
2018-08-09 22:19:17,974 ActorAddr-(T|:28221)/PID:6204 esrally.actor INFO Stopping nodes [c1b-searchclienta102-prod, c1b-searcha105-prod, c1f-searcha112-prod, c1f-searchclienta103-prod, c1f-searcha103-prod, c1f-searcha111-prod, c1b-searcha106-prod, c1c-searcha108-prod, c1c-searcha107-prod, c1c-searchclienta101-prod, c1c-searcha109-prod, c1b-searcha102-prod, c1f-searcha110-prod, c1b-searchmastera102-prod, c1c-searchmastera101-prod, c1c-searcha101-prod, c1b-searcha104-prod, c1f-searchmastera103-prod] (due to ActorExitRequest)
2018-08-09 22:19:17,969 ActorAddr-(T|:26823)/PID:6198 esrally.mechanic.telemetry WARNING indexing_total_time is 125082439 ms indicating that the cluster is not in a defined clean state. Recorded index time metrics may be misleading.
2018-08-09 22:19:17,970 ActorAddr-(T|:26823)/PID:6198 esrally.mechanic.telemetry WARNING refresh_total_time is 25847236 ms indicating that the cluster is not in a defined clean state. Recorded index time metrics may be misleading.
2018-08-09 22:19:17,965 ActorAddr-(T|:10509)/PID:17448 esrally.actor ERROR Error in track preparator
Traceback (most recent call last):

  File "/usr/local/lib/python3.5/dist-packages/esrally/actor.py", line 67, in guard
    return f(self, msg, sender)

  File "/usr/local/lib/python3.5/dist-packages/esrally/driver/driver.py", line 285, in receiveMsg_PrepareTrack
    track.track_repo(cfg, fetch=True, update=True)

  File "/usr/local/lib/python3.5/dist-packages/esrally/track/loader.py", line 140, in track_repo
    return GitTrackRepository(cfg, fetch, update)

  File "/usr/local/lib/python3.5/dist-packages/esrally/track/loader.py", line 175, in __init__
    self.repo = repo_class(remote_url, tracks_dir, repo_name, "tracks", offline, fetch)

  File "/usr/local/lib/python3.5/dist-packages/esrally/utils/repo.py", line 34, in __init__
    .format(src=self.repo_dir))

esrally.exceptions.SystemSetupError: ('[/root/.rally/benchmarks/tracks/custom] must be a git repository.\n\nPlease run:\ngit -C /root/.rally/benchmarks/tracks/custom init', None)

2018-08-09 22:19:17,980 ActorAddr-(T|:33421)/PID:6205 esrally.actor ERROR Main driver received a fatal exception from a load generator. Shutting down.
2018-08-09 22:19:17,970 ActorAddr-(T|:26823)/PID:6198 esrally.mechanic.telemetry WARNING flush_total_time is 580266 ms indicating that the cluster is not in a defined clean state. Recorded index time metrics may be misleading.
2018-08-09 22:19:17,982 ActorAddr-(T|:33421)/PID:6205 esrally.actor INFO Main driver received ActorExitRequest and will terminate all load generators.
2018-08-09 22:19:17,986 ActorAddr-(T|:21129)/PID:6197 esrally.actor INFO BenchmarkActor received unknown message [ChildActorExited:ActorAddr-(T|:26823)] (ignoring).
2018-08-09 22:19:17,986 ActorAddr-(T|:33421)/PID:6205 esrally.actor INFO A track preparator has exited.
2018-08-09 22:19:17,987 ActorAddr-(T|:33421)/PID:6205 esrally.actor INFO A track preparator has exited.
2018-08-09 22:19:17,973 ActorAddr-(T|:26823)/PID:6198 esrally.actor INFO MechanicActor#receiveMessage unrecognized(msg = [<class 'thespian.actors.ActorExitRequest'>] sender = [ActorAddr-(T|:21129)])
2018-08-09 22:19:17,978 ActorAddr-(T|:26823)/PID:6198 esrally.actor ERROR Child actor exited with [ChildActorExited:ActorAddr-(T|:28221)] while in status [benchmark_started].
2018-08-09 22:19:17,993 ActorAddr-(T|:21129)/PID:6197 esrally.actor INFO BenchmarkActor received unknown message [ChildActorExited:ActorAddr-(T|:26823)] (ignoring).
2018-08-09 22:19:17,990 ActorAddr-(T|:36219)/PID:2016 esrally.actor ERROR Error in track preparator
Traceback (most recent call last):

  File "/usr/local/lib/python3.5/dist-packages/esrally/actor.py", line 67, in guard
    return f(self, msg, sender)

  File "/usr/local/lib/python3.5/dist-packages/esrally/driver/driver.py", line 285, in receiveMsg_PrepareTrack
    track.track_repo(cfg, fetch=True, update=True)

  File "/usr/local/lib/python3.5/dist-packages/esrally/track/loader.py", line 140, in track_repo
    return GitTrackRepository(cfg, fetch, update)

  File "/usr/local/lib/python3.5/dist-packages/esrally/track/loader.py", line 175, in __init__
    self.repo = repo_class(remote_url, tracks_dir, repo_name, "tracks", offline, fetch)

  File "/usr/local/lib/python3.5/dist-packages/esrally/utils/repo.py", line 34, in __init__
    .format(src=self.repo_dir))

esrally.exceptions.SystemSetupError: ('[/root/.rally/benchmarks/tracks/custom] must be a git repository.\n\nPlease run:\ngit -C /root/.rally/benchmarks/tracks/custom init', None)

2018-08-09 22:19:17,996 ActorAddr-(T|:33421)/PID:6205 esrally.actor INFO A track preparator has exited.
2018-08-09 22:19:17,999 ActorAddr-(T|:21129)/PID:6197 esrally.actor INFO BenchmarkActor received unknown message [ChildActorExited:ActorAddr-(T|:33421)] (ignoring).

What's going on? Reinitializing it doesn't work. I seemed to have followed the docs. The way I run the command is:
esrally --pipeline=benchmark-only --track-repository=custom --track=/root/.rally/benchmarks/tracks/custom/mytrack ... host arguments

Hi,

our docs explain under which circumstances it makes sense to use track repositories. So if you really want a track repository, can you ensure that you actually committed your changes? (this would be the next error otherwise).

You should do the following:

cd /root/.rally/benchmarks/tracks/custom
rm -rf .git
git init
git add .
git commit -m "Initial commit"

Then everything should work.

Also, if you use a track repository, you just specify the name of the track, not the actual path to it.

So you can either use --track-path:

esrally --pipeline=benchmark-only --track-path=/root/.rally/benchmarks/tracks/custom/mytrack ...

or --track-repository and --track:

So you can either use --track-path:

esrally --pipeline=benchmark-only --track-repository=custom --track=mytrack ... 

Daniel

@danielmitterdorfer

Yes, I have tried reinitializing multiple times according to the doc before starting the thread. Just to confirm:

~/.rally/benchmarks/tracks/custom# git status
On branch master
nothing to commit, working tree clean

In custom:

~/.rally/benchmarks/tracks/custom# ls
mytrack

Running

esrally --pipeline=benchmark-only --track-repository=custom --track=mytrack ...

Still gives:

[ERROR] Cannot race. Error in track preparator
	[/root/.rally/benchmarks/tracks/custom] must be a git repository.

Please run:
git -C /root/.rally/benchmarks/tracks/custom init

Neither the steps you've mentioned, nor the command in the error message seem to work.

Trying to get it working with:

esrally --pipeline=benchmark-only --track-path=/root/.rally/benchmarks/tracks/custom/mytrack ...

Yields:

[ERROR] Cannot race. Error in track preparator
	Track path /root/.rally/benchmarks/tracks/custom/mytrack does not exist

Same result even when I point to /root/.rally/benchmarks/tracks/custom/mytrack/track.json

~/.rally/benchmarks/tracks/custom/mytrack# ls
challenges  files.txt  index.json  node_modules  operations  __pycache__  README.md  report.csv  terms.txt  track.json	track.py
~/.rally/benchmarks/tracks/custom/mytrack# echo $PWD
/root/.rally/benchmarks/tracks/custom/mytrack

So weird. I had it all working at some point.

Ok, @danielmitterdorfer I have found the issue. The key was in something that I've omitted as I've thought it to be useless information. I actually ran the command with --load-driver-hosts. Naturally, if the track is absent on the driver hosts it won't work, and truth be told it is mentioned in the docs. However, I believe it could be a little friendlier in the error message to say "make sure you have the track on the driver hosts if you utilize them" or a similar pointer. Between setting things up and running them you just forget what is what and git error message comes off as truly bizarre.

Thanks for your help!

Hi,

thanks for your feedback; we really appreciate it. We'll see that we can improve the error message in that case.

Daniel

I've raised https://github.com/elastic/rally/issues/552 now.

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