Browse Source

Troubleshooting guides for disabled allocations (#86789)

This adds the troubleshooing guides when index and cluster allocations are
disabled.

Co-authored-by: Lee Hinman <dakrone@users.noreply.github.com>
Andrei Dan 3 years ago
parent
commit
08b323131f

+ 1 - 0
docs/reference/index-modules.asciidoc

@@ -292,6 +292,7 @@ Defaults to `*`, which matches all fields eligible for
 <<term-level-queries,term-level queries>>, excluding metadata fields.
 --
 
+[[index-routing-allocation-enable-setting]]
  `index.routing.allocation.enable`::
 
     Controls shard allocation for this index. It can be set to:

+ 40 - 0
docs/reference/tab-widgets/troubleshooting/data/enable-cluster-allocation-widget.asciidoc

@@ -0,0 +1,40 @@
+++++
+<div class="tabs" data-tab-group="host">
+  <div role="tablist" aria-label="Allow allocation in the system">
+    <button role="tab"
+            aria-selected="true"
+            aria-controls="cloud-tab-allow-cluster-allocation"
+            id="cloud-allow-cluster-allocation">
+      Elasticsearch Service
+    </button>
+    <button role="tab"
+            aria-selected="false"
+            aria-controls="self-managed-tab-allow-cluster-allocation"
+            id="self-managed-allow-cluster-allocation"
+            tabindex="-1">
+      Self-managed
+    </button>
+  </div>
+  <div tabindex="0"
+       role="tabpanel"
+       id="cloud-tab-allow-cluster-allocation"
+       aria-labelledby="cloud-allow-cluster-allocation">
+++++
+
+include::enable-cluster-allocation.asciidoc[tag=cloud]
+
+++++
+  </div>
+  <div tabindex="0"
+       role="tabpanel"
+       id="self-managed-tab-allow-cluster-allocation"
+       aria-labelledby="self-managed-allow-cluster-allocation"
+       hidden="">
+++++
+
+include::enable-cluster-allocation.asciidoc[tag=self-managed]
+
+++++
+  </div>
+</div>
+++++

+ 128 - 0
docs/reference/tab-widgets/troubleshooting/data/enable-cluster-allocation.asciidoc

@@ -0,0 +1,128 @@
+// tag::cloud[]
+In order to get the shards assigned we'll need to change the value of the
+<<cluster-routing-allocation-enable, configuration>> that restricts the 
+assignemnt of the shards to allow all shards to be allocated.
+
+We'll achieve this by inspecting the system-wide `cluster.routing.allocation.enable` 
+<<cluster-get-settings, cluster setting>> and changing the configured value to 
+`all`.
+
+**Use {kib}**
+
+//tag::kibana-api-ex[]
+. Log in to the {ess-console}[{ecloud} console].
++
+
+. On the **Elasticsearch Service** panel, click the name of your deployment. 
++
+
+NOTE:
+If the name of your deployment is disabled your {kib} instances might be
+unhealthy, in which case please contact https://support.elastic.co[Elastic Support],
+or your deployment doesn't include {kib}, in which case all you need to do is 
+{cloud}/ec-access-kibana.html[enable Kibana first].
+
+. Open your deployment's side navigation menu (placed under the Elastic logo in the upper left corner)
+and go to **Dev Tools > Console**.
++
+[role="screenshot"]
+image::images/kibana-console.png[{kib} Console,align="center"]
+
+. Inspect the `cluster.routing.allocation.enable` <<cluster-get-settings, cluster setting>>:
++
+[source,console]
+----
+GET /_cluster/settings?flat_settings
+----
++
+The response will look like this:
++
+[source,console-result]
+----
+{
+  "persistent": {
+    "cluster.routing.allocation.enable": "none" <1>
+  },
+  "transient": {}
+}
+----
+// TESTRESPONSE[skip:the result is for illustrating purposes only as don't want to change a cluster-wide setting]
+
++
+<1> Represents the current configured value that controls if data is partially
+or fully allowed to be allocated in the system.
+
+. <<cluster-update-settings,Change>> the <<cluster-routing-allocation-enable, configuration>> 
+value to allow all the data in the system to be fully allocated:
++
+[source,console]
+----
+PUT _cluster/settings
+{
+  "persistent" : {
+    "cluster.routing.allocation.enable" : "all" <1>
+  }
+}
+----
+// TEST[continued]
+
++
+<1> The new value for the `allocation.enable` system-wide configuration 
+is changed to allow all the shards to be allocated. 
+
+//end::kibana-api-ex[]
+// end::cloud[]
+
+// tag::self-managed[]
+In order to get the shards assigned we'll need to change the value of the
+<<cluster-routing-allocation-enable, configuration>> that restricts the 
+assignemnt of the shards to allow all shards to be allocated.
+
+We'll achieve this by inspecting the system-wide `cluster.routing.allocation.enable` 
+<<cluster-get-settings, cluster setting>> and changing the configured value to 
+`all`.
+
+. Inspect the `cluster.routing.allocation.enable` <<cluster-get-settings, cluster setting>>:
++
+[source,console]
+----
+GET /_cluster/settings?flat_settings
+----
++
+The response will look like this:
++
+[source,console-result]
+----
+{
+  "persistent": {
+    "cluster.routing.allocation.enable": "none" <1>
+  },
+  "transient": {}
+}
+----
+// TESTRESPONSE[skip:the result is for illustrating purposes only as don't want to change a cluster-wide setting]
+
++
+<1> Represents the current configured value that controls if data is partially
+or fully allowed to be allocated in the system.
+
+. <<cluster-update-settings,Change>> the <<cluster-routing-allocation-enable, configuration>> 
+value to allow all the data in the system to be fully allocated:
++
+[source,console]
+----
+PUT _cluster/settings
+{
+  "persistent" : {
+    "cluster.routing.allocation.enable" : "all" <1>
+  }
+}
+----
+// TEST[continued]
+
++
+<1> The new value for the `allocation.enable` system-wide configuration 
+is changed to allow all the shards to be allocated. 
+
+// end::self-managed[]
+

+ 40 - 0
docs/reference/tab-widgets/troubleshooting/data/enable-index-allocation-widget.asciidoc

@@ -0,0 +1,40 @@
+++++
+<div class="tabs" data-tab-group="host">
+  <div role="tablist" aria-label="Allow index allocation">
+    <button role="tab"
+            aria-selected="true"
+            aria-controls="cloud-tab-allow-index-allocation"
+            id="cloud-allow-index-allocation">
+      Elasticsearch Service
+    </button>
+    <button role="tab"
+            aria-selected="false"
+            aria-controls="self-managed-tab-allow-index-allocation"
+            id="self-managed-allow-index-allocation"
+            tabindex="-1">
+      Self-managed
+    </button>
+  </div>
+  <div tabindex="0"
+       role="tabpanel"
+       id="cloud-tab-allow-index-allocation"
+       aria-labelledby="cloud-allow-index-allocation">
+++++
+
+include::enable-index-allocation.asciidoc[tag=cloud]
+
+++++
+  </div>
+  <div tabindex="0"
+       role="tabpanel"
+       id="self-managed-tab-allow-index-allocation"
+       aria-labelledby="self-managed-allow-index-allocation"
+       hidden="">
+++++
+
+include::enable-index-allocation.asciidoc[tag=self-managed]
+
+++++
+  </div>
+</div>
+++++

+ 146 - 0
docs/reference/tab-widgets/troubleshooting/data/enable-index-allocation.asciidoc

@@ -0,0 +1,146 @@
+//////////////////////////
+
+[source,console]
+--------------------------------------------------
+PUT my-index-000001
+{
+  "settings": {
+    "index.routing.allocation.enable": "primaries"
+  }
+}
+
+--------------------------------------------------
+// TESTSETUP
+
+[source,console]
+--------------------------------------------------
+DELETE my-index-000001
+--------------------------------------------------
+// TEARDOWN
+
+//////////////////////////
+
+// tag::cloud[]
+In order to get the shards assigned we'll need to change the value of the 
+<<index-routing-allocation-enable-setting, configuration>> that restricts the 
+assignemnt of the shards to `all`.
+
+**Use {kib}**
+
+//tag::kibana-api-ex[]
+. Log in to the {ess-console}[{ecloud} console].
++
+
+. On the **Elasticsearch Service** panel, click the name of your deployment. 
++
+
+NOTE:
+If the name of your deployment is disabled your {kib} instances might be
+unhealthy, in which case please contact https://support.elastic.co[Elastic Support],
+or your deployment doesn't include {kib}, in which case all you need to do is 
+{cloud}/ec-access-kibana.html[enable Kibana first].
+
+. Open your deployment's side navigation menu (placed under the Elastic logo in the upper left corner)
+and go to **Dev Tools > Console**.
++
+[role="screenshot"]
+image::images/kibana-console.png[{kib} Console,align="center"]
+
+. Inspect the `index.routing.allocation.enable` <<indices-get-settings, index setting>> 
+for the index with unassigned shards:
++
+[source,console]
+----
+GET /my-index-000001/_settings/index.routing.allocation.enable?flat_settings
+----
++
+The response will look like this:
++
+[source,console-result]
+----
+{
+  "my-index-000001": {
+    "settings": {
+      "index.routing.allocation.enable": "none" <1>
+    }
+  }
+}
+----
+// TESTRESPONSE[skip:the result is for illustrating purposes only]
+
++
+<1> Represents the current configured value that controls if the index is allowed 
+to be partially or totally allocated.
+
+. <<indices-update-settings,Change>> the <<index-routing-allocation-enable-setting, configuration>> 
+value to allow the index to be fully allocated:
++
+[source,console]
+----
+PUT /my-index-000001/_settings
+{
+  "index" : {
+    "routing.allocation.enable" : "all" <1>
+  }
+}
+----
+// TEST[continued]
+
++
+<1> The new value for the `allocation.enable` configuration for the `my-index-000001` index
+is changed to allow all the shards to be allocated. 
+
+//end::kibana-api-ex[]
+// end::cloud[]
+
+// tag::self-managed[]
+In order to get the shards assigned we'll need to change the value of the 
+<<index-routing-allocation-enable-setting, configuration>> that restricts the 
+assignemnt of the shards to `all`.
+
+. Inspect the `index.routing.allocation.enable` <<indices-get-settings, index setting>> 
+for the index with unassigned shards:
++
+[source,console]
+----
+GET /my-index-000001/_settings/index.routing.allocation.enable?flat_settings
+----
++
+The response will look like this:
++
+[source,console-result]
+----
+{
+  "my-index-000001": {
+    "settings": {
+      "index.routing.allocation.enable": "none" <1>
+    }
+  }
+}
+----
+// TESTRESPONSE[skip:the result is for illustrating purposes only]
+
++
+<1> Represents the current configured value that controls if the index is allowed 
+to be partially or totally allocated.
+
+. <<indices-update-settings,Change>> the <<index-routing-allocation-enable-setting, configuration>> 
+value to allow the index to be fully allocated:
++
+[source,console]
+----
+PUT /my-index-000001/_settings
+{
+  "index" : {
+    "routing.allocation.enable" : "all" <1>
+  }
+}
+----
+// TEST[continued]
+
++
+<1> The new value for the `allocation.enable` configuration for the `my-index-000001` index
+is changed to allow all the shards to be allocated. 
+
+// end::self-managed[]
+

+ 1 - 2
docs/reference/tab-widgets/troubleshooting/data/increase-cluster-shard-limit.asciidoc

@@ -49,8 +49,7 @@ and go to **Dev Tools > Console**.
 [role="screenshot"]
 image::images/kibana-console.png[{kib} Console,align="center"]
 
-. Inspect the `cluster.routing.allocation.total_shards_per_node` <<cluster-get-settings, cluster setting>> 
-for the index with unassigned shards:
+. Inspect the `cluster.routing.allocation.total_shards_per_node` <<cluster-get-settings, cluster setting>>:
 +
 [source,console]
 ----

+ 4 - 0
docs/reference/troubleshooting.asciidoc

@@ -14,6 +14,10 @@ include::troubleshooting/data/increase-shard-limit.asciidoc[]
 
 include::troubleshooting/data/increase-cluster-shard-limit.asciidoc[]
 
+include::troubleshooting/data/enable-index-allocation.asciidoc[]
+
+include::troubleshooting/data/enable-cluster-allocation.asciidoc[]
+
 include::troubleshooting/data/data-tiers-mixed-with-node-attr.asciidoc[]
 
 include::troubleshooting/data/diagnose-unassigned-shards.asciidoc[]

+ 16 - 0
docs/reference/troubleshooting/data/enable-cluster-allocation.asciidoc

@@ -0,0 +1,16 @@
+[[allow-all-cluster-allocation]]
+== Allow Elasticsearch to allocate the data in the system
+
+The allocation of data in an {es} deployment can be controlled using the <<cluster-routing-allocation-enable, enable 
+cluster allocation configuration>>.
+In certain circumstances users might want to temporarily disable or restrict the
+allocation of data in the system. 
+
+Forgetting to re-allow all data allocations can lead to unassigned shards.
+
+In order to (re)allow all data to be allocated follow these steps:
+
+include::{es-repo-dir}/tab-widgets/troubleshooting/data/enable-cluster-allocation-widget.asciidoc[]
+
+
+

+ 16 - 0
docs/reference/troubleshooting/data/enable-index-allocation.asciidoc

@@ -0,0 +1,16 @@
+[[allow-all-index-allocation]]
+== Allow Elasticsearch to allocate the index
+
+The allocation of data can be controlled using the <<index-routing-allocation-enable-setting, enable 
+allocation configuration>>.
+In certain circumstances users might want to temporarily disable or restrict the
+allocation of data. 
+
+Forgetting to re-allow all data allocation can lead to unassigned shards.
+
+In order to (re)allow all data to be allocated follow these steps:
+
+include::{es-repo-dir}/tab-widgets/troubleshooting/data/enable-index-allocation-widget.asciidoc[]
+
+
+