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

Rally cannot create rally-annotations index in Elasticsearch metric store #1746

Closed
gbanasiak opened this issue Jul 12, 2023 · 0 comments
Closed
Labels
bug Something's wrong
Milestone

Comments

@gbanasiak
Copy link
Contributor

Rally version (get with esrally --version): esrally 2.8.1.dev0 (git revision: 01f3c25361d1128def77e3ea5d29c899580993b1)

Invoked command: esrally add annotation --track=elastic/security --message="test" --race-timestamp=20230712T000000Z

Configuration file (~/.rally/rally.ini):

[..]
[reporting]
datastore.type = elasticsearch
datastore.host = <HOST>
datastore.port = <PORT>
datastore.secure = true
datastore.user = <USER>
datastore.password = <PASSWORD>
datastore.number_of_shards = <X>
datastore.number_of_replicas = 1
[..]

JVM version: n/a

OS version: Mac / Python 3.11.0

Description of the problem including expected versus actual behavior:

When rally-annotations index is missing the command fails as follows:

(.venv) grzegorz:elastic/rally% esrally add annotation --track=elastic/security --message="test" --race-timestamp=20230712T000000Z

    ____        ____
   / __ \____ _/ / /_  __
  / /_/ / __ `/ / / / / /
 / _, _/ /_/ / / / /_/ /
/_/ |_|\__,_/_/_/\__, /
                /____/

[ERROR] Cannot add. 'index'.

The expected result is rally-annotations index gets created when missing.

Steps to reproduce:

  1. Remove rally-annotations from Elasticsearch metric store.
  2. Run the above command.

Provide logs (if relevant):

2023-07-12 06:25:44,25 -not-actor-/PID:51384 esrally.rally ERROR A fatal error occurred while running subcommand [add].
Traceback (most recent call last):
  File "/Users/grzegorz/Documents/src/elastic/rally/esrally/rally.py", line 1100, in dispatch_sub_command
    dispatch_add(cfg)
  File "/Users/grzegorz/Documents/src/elastic/rally/esrally/rally.py", line 865, in dispatch_add
    metrics.add_annotation(cfg)
  File "/Users/grzegorz/Documents/src/elastic/rally/esrally/metrics.py", line 1305, in add_annotation
    race_store(cfg).add_annotation()
  File "/Users/grzegorz/Documents/src/elastic/rally/esrally/metrics.py", line 1655, in add_annotation
    return self.es_store.add_annotation()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/grzegorz/Documents/src/elastic/rally/esrally/metrics.py", line 1776, in add_annotation
    body = self.index_template_provider.annotations_template()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/grzegorz/Documents/src/elastic/rally/esrally/metrics.py", line 301, in annotations_template
    return self._read("annotation-template")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/grzegorz/Documents/src/elastic/rally/esrally/metrics.py", line 312, in _read
    template["settings"]["index"]["number_of_shards"] = int(self._number_of_shards)
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
KeyError: 'index'
@gbanasiak gbanasiak added the bug Something's wrong label Jul 12, 2023
@gbanasiak gbanasiak added this to the 2.8.1 milestone Jul 13, 2023
@gbanasiak gbanasiak modified the milestones: 2.8.1, 2.9.0 Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something's wrong
Projects
None yet
Development

No branches or pull requests

1 participant