Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log results of cluster health check #1203

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions esrally/driver/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -967,13 +967,16 @@ def status(v):
cluster_status = result["status"]
relocating_shards = result["relocating_shards"]

return {
result = {
"weight": 1,
"unit": "ops",
"success": status(cluster_status) >= status(expected_cluster_status) and relocating_shards <= expected_relocating_shards,
"cluster-status": cluster_status,
"relocating-shards": relocating_shards
}
self.logger.info("%s: expected status=[%s], actual status=[%s], relocating shards=[%d], success=[%s].",
repr(self), expected_cluster_status, cluster_status, relocating_shards, result["success"])
return result

def __repr__(self, *args, **kwargs):
return "cluster-health"
Expand Down Expand Up @@ -2208,7 +2211,8 @@ async def __call__(self, es, params):
self.logger.debug("%s has returned successfully", repr(self.delegate))
return return_value
else:
self.logger.debug("%s has returned with an error: %s.", repr(self.delegate), return_value)
self.logger.info("[%s] has returned with an error: %s. Retrying in [%.2f] seconds.",
repr(self.delegate), return_value, sleep_time)
await asyncio.sleep(sleep_time)
else:
return return_value
Expand All @@ -2221,7 +2225,7 @@ async def __call__(self, es, params):
if last_attempt or not retry_on_timeout:
raise e
elif e.status_code == 408:
self.logger.debug("%s has timed out.", repr(self.delegate))
self.logger.info("[%s] has timed out. Retrying in [%.2f] seconds.", repr(self.delegate), sleep_time)
await asyncio.sleep(sleep_time)
else:
raise e
Expand Down