Skip to content

ES replicas defaults to 1 even when specifying --es.num-replicas=0 when starting collector and query #369

@bharat-p

Description

@bharat-p

With a local single node ES cluster if I start Jaeger collector and query to use Elasticsearch as backend with following options:

-span-storage.type=elasticsearch --es.num-shards=1 --es.num-replicas=0 --es.server-urls=http://jaeger-es:9200 --dependency-storage.type=elasticsearch

Upon checking output of localhost:9200/_cluster/health?pretty

{
  "cluster_name" : "jaeger-cluster",
  "status" : "yellow",
  "timed_out" : false,
  "number_of_nodes" : 1,
  "number_of_data_nodes" : 1,
  "active_primary_shards" : 4,
  "active_shards" : 4,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 4,
  "delayed_unassigned_shards" : 0,
  "number_of_pending_tasks" : 0,
  "number_of_in_flight_fetch" : 0,
  "task_max_waiting_in_queue_millis" : 0,
  "active_shards_percent_as_number" : 50.0
}

ES cluster health check shows status 'yellow' and you will notice active_primary_shards=4 and unassigned_shards=4, which means some indexes are configured with value replicas=1, this can be confirmed by checking output of :

http://localhost:9200/jaeger-span-2017-09-02/_settings?pretty

{
  "jaeger-span-2017-09-02" : {
    "settings" : {
      "index" : {
        "mapping" : {
          "nested_fields" : {
            "limit" : "50"
          }
        },
        "number_of_shards" : "1",
        "provided_name" : "jaeger-span-2017-09-02",
        "mapper" : {
          "dynamic" : "false"
        },
        "creation_date" : "1504368267533",
        "requests" : {
          "cache" : {
            "enable" : "true"
          }
        },
        "number_of_replicas" : "1",
        "uuid" : "AkWNKfQSRlCa9pIoxilj5g",
        "version" : {
          "created" : "5050299"
        }
      }
    }
  }
}

This confirms that when creating indexes number_of_repliacas is getting set to 1, when it should have been set to 0.
This is a problem when running a single node ES cluster where we want replicas to be set to 0 intentionally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions