Parameters in some files not exposed?

Hi,

I am trying to use -track-params.
My track is typical:

{
    "version": 2,
    "description": "Tracker-generated track for track",
    "indices": [
      {
        "name": "{{p_target_index}}",
        "body": "{{p_target_index}}.json"
      }
    ],
    "corpora": [
      {
        "name": "{{p_target_index}}",
        "documents": [
          {
            "target-index": "{{p_target_index}}",
            "source-file": "{{p_target_index}}-documents.json.bz2",
            "document-count": 84307,
            "compressed-bytes": 14347644,
            "uncompressed-bytes": 147680059
          }
        ]
      }
    ],
    "operations": [
        {{ rally.collect(parts="operations/*.json") }}
    ],
    "challenges": [
        {{ rally.collect(parts="challenges/*.json") }}
    ]    
}

and I have some params like cluster_health here in challenges/default.json:

                    "wait_for_status": "{{cluster_health | default('green')}}",

but if my params.json contains this:

{
    "cluster_health": "green",
    "number_of_shards": 1,
    "number_of_replicas": 3
}

I get an error saying 'cluster_health' is provided but not exposed. I can only use "number_of_shards"/"number_of_replicas" that are in the index files.

Am I doing something wrong?
thanks!

@jmlucjav I have seen this before but not taken the care to find a reproducible case for an issue. I believe you may be able to work around this by defining an unused parameter in the parameters of the track:

    "parameters": {
        "cluster_health": "{{cluster_health | default('green')}}"
    },

Please let me know if this helps.

Meanwhile, if you have a simple case that reproduces the issue we would be much obliged if you filed an issue at Issues · elastic/rally · GitHub with the reproduction.

Hi Rick,

sorry I didn't totally understand. You mean if I am going to use 'cluster_health' in my index json file, then I should somehow declare in the track.json like this??

{
    "version": 2,
    "description": "Tracker-generated track for track",
    "indices": [
      {
        "name": "{{p_target_index}}",
        "body": "{{p_target_index}}.json"
      }
    ],
    "parameters": {
        "cluster_health": "{{cluster_health | default('green')}}"
    },
    "corpora": [

I'll see if I can simplify my case to open an issue in Github...

thanks

Yes, it's a bit of a hacky workaround but I have reason to believe it should work. In fact it could be in a standalone line such as

{% set _cluster_health = _cluster_health | default('green') %}

And then it would be up to you to perhaps set the later instance of cluster_health instead as _cluster_health without the default function:

                    "wait_for_status": "{{ _cluster_health }}",

hey,

back here to report on my progress:

  • I found (via another issue) some basic params were not being passed properly (most probably due to some errors on my side), so I stopped trying to parametrize things, and went the slow but sure way of changing stuff manually
  • I have tried to reproduce this issue in a small, much simpler setup, and I cannot, so not sure this can be reproduced easily...sorry

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