Skip to content

Conversation

bharat-p
Copy link
Member

@bharat-p bharat-p commented Mar 23, 2018

Resolves #369

See original PR#371 (which I messed up while updating my outdated branch) for past discussion around this.

ES number of replicas was getting set to 1 even when specifying --es.num-replicas=0 when starting collector and query, which caused a single node ES cluster to be always in "yellow" state with unassigned shards.

Before fix:

output of localhost:9200/_cluster/health?pretty

curl "localhost:9200/_cluster/health?pretty"                                                         [Mar 22, 7:06 PM]
{
  "cluster_name" : "jaeger-cluster",
  "status" : "yellow",
  "timed_out" : false,
  "number_of_nodes" : 1,
  "number_of_data_nodes" : 1,
  "active_primary_shards" : 10,
  "active_shards" : 10,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 10,
  "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
}

output of http://localhost:9200/jaeger-span-2018-03-23/_settings?pretty

curl "http://localhost:9200/jaeger-span-2018-03-23/_settings?pretty"                                 [Mar 22, 7:07 PM]
{
  "jaeger-span-2018-03-23" : {
    "settings" : {
      "index" : {
        "mapping" : {
          "nested_fields" : {
            "limit" : "50"
          }
        },
        "number_of_shards" : "5",
        "provided_name" : "jaeger-span-2018-03-23",
        "mapper" : {
          "dynamic" : "false"
        },
        "creation_date" : "1521770836101",
        "requests" : {
          "cache" : {
            "enable" : "true"
          }
        },
        "number_of_replicas" : "1",
        "uuid" : "GxfUsJRzQP25QyFw1M0gGg",
        "version" : {
          "created" : "5050399"
        }
      }
    }
  }
}

Verified after fix:
output of http://localhost:9200/_cluster/health?pretty

{
  "cluster_name" : "jaeger-cluster",
  "status" : "green",
  "timed_out" : false,
  "number_of_nodes" : 1,
  "number_of_data_nodes" : 1,
  "active_primary_shards" : 10,
  "active_shards" : 10,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 0,
  "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" : 100.0
}

After fix output of http://localhost:9200/jaeger-span-2018-03-23/_settings?pretty

curl "http://localhost:9200/jaeger-span-2018-03-23/_settings?pretty"                                [Mar 22, 7:02 PM]
{
  "jaeger-span-2018-03-23" : {
    "settings" : {
      "index" : {
        "mapping" : {
          "nested_fields" : {
            "limit" : "50"
          }
        },
        "number_of_shards" : "5",
        "provided_name" : "jaeger-span-2018-03-23",
        "mapper" : {
          "dynamic" : "false"
        },
        "creation_date" : "1521770529358",
        "requests" : {
          "cache" : {
            "enable" : "true"
          }
        },
        "number_of_replicas" : "0",
        "uuid" : "rMVWSG4uRgmEQDlXyKu-DA",
        "version" : {
          "created" : "5050399"
        }
      }
    }
  }
}

…o 0 instead of 1 (jaegertracing#369)

Signed-off-by: Bharat Patel <bharrat@gmail.com>
Signed-off-by: Bharat Patel <bharrat@gmail.com>
@bharat-p bharat-p force-pushed the bharat-es-replica-fix branch from 405ba64 to 623fa92 Compare March 23, 2018 02:11
Signed-off-by: Bharat Patel <bharrat@gmail.com>
@coveralls
Copy link

coveralls commented Mar 23, 2018

Coverage Status

Coverage remained the same at 100.0% when pulling 21f6b64 on bharat-p:bharat-es-replica-fix into 83d06da on jaegertracing:master.

@pavolloffay
Copy link
Member

@bharat-p thanks!

@pavolloffay pavolloffay merged commit 437c010 into jaegertracing:master Mar 26, 2018
@pavolloffay
Copy link
Member

At some point, we should consider externalizing all ES configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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