cluster_restart.asciidoc 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. [[restart-upgrade]]
  2. == Full cluster restart upgrade
  3. A full cluster restart upgrade requires that you shut all nodes in the cluster
  4. down, upgrade them, and restart the cluster. A full cluster restart was required
  5. when upgrading to major versions prior to 6.x. Elasticsearch 6.x supports
  6. <<rolling-upgrades, rolling upgrades>> from *Elasticsearch 5.6*. Upgrading to
  7. 6.x from earlier versions requires a full cluster restart. See the
  8. <<upgrade-paths,Upgrade paths table>> to verify the type of upgrade you need
  9. to perform.
  10. To perform a full cluster restart upgrade:
  11. . *Disable shard allocation.*
  12. +
  13. --
  14. include::disable-shard-alloc.asciidoc[]
  15. --
  16. . *Stop indexing and perform a synced flush.*
  17. +
  18. --
  19. Performing a <<indices-synced-flush, synced-flush>> speeds up shard
  20. recovery.
  21. include::synced-flush.asciidoc[]
  22. --
  23. . *Stop any machine learning jobs that are running.*
  24. +
  25. --
  26. include::close-ml.asciidoc[]
  27. --
  28. . *Shutdown all nodes.*
  29. +
  30. --
  31. include::shut-down-node.asciidoc[]
  32. --
  33. . *Upgrade all nodes.*
  34. +
  35. --
  36. include::remove-xpack.asciidoc[]
  37. --
  38. +
  39. --
  40. include::upgrade-node.asciidoc[]
  41. include::set-paths-tip.asciidoc[]
  42. --
  43. . *Upgrade any plugins.*
  44. +
  45. Use the `elasticsearch-plugin` script to install the upgraded version of each
  46. installed Elasticsearch plugin. All plugins must be upgraded when you upgrade
  47. a node.
  48. . *Start each upgraded node.*
  49. +
  50. --
  51. If you have dedicated master nodes, start them first and wait for them to
  52. form a cluster and elect a master before proceeding with your data nodes.
  53. You can check progress by looking at the logs.
  54. If upgrading from a 6.x cluster, you must
  55. <<modules-discovery-bootstrap-cluster,configure cluster bootstrapping>> by
  56. setting the `cluster.initial_master_nodes` setting.
  57. As soon as enough master-eligible nodes have discovered each other, they form a
  58. cluster and elect a master. At that point, you can use
  59. <<cat-health,`_cat/health`>> and <<cat-nodes,`_cat/nodes`>> to monitor nodes
  60. joining the cluster:
  61. [source,sh]
  62. --------------------------------------------------
  63. GET _cat/health
  64. GET _cat/nodes
  65. --------------------------------------------------
  66. // CONSOLE
  67. The `status` column returned by `_cat/health` shows the health of each node
  68. in the cluster: `red`, `yellow`, or `green`.
  69. --
  70. . *Wait for all nodes to join the cluster and report a status of yellow.*
  71. +
  72. --
  73. When a node joins the cluster, it begins to recover any primary shards that
  74. are stored locally. The <<cat-health,`_cat/health`>> API initially reports
  75. a `status` of `red`, indicating that not all primary shards have been allocated.
  76. Once a node recovers its local shards, the cluster `status` switches to `yellow`,
  77. indicating that all primary shards have been recovered, but not all replica
  78. shards are allocated. This is to be expected because you have not yet
  79. reenabled allocation. Delaying the allocation of replicas until all nodes
  80. are `yellow` allows the master to allocate replicas to nodes that
  81. already have local shard copies.
  82. --
  83. . *Reenable allocation.*
  84. +
  85. --
  86. When all nodes have joined the cluster and recovered their primary shards,
  87. reenable allocation by restoring `cluster.routing.allocation.enable` to its
  88. default:
  89. [source,js]
  90. ------------------------------------------------------
  91. PUT _cluster/settings
  92. {
  93. "persistent": {
  94. "cluster.routing.allocation.enable": null
  95. }
  96. }
  97. ------------------------------------------------------
  98. // CONSOLE
  99. Once allocation is reenabled, the cluster starts allocating replica shards to
  100. the data nodes. At this point it is safe to resume indexing and searching,
  101. but your cluster will recover more quickly if you can wait until all primary
  102. and replica shards have been successfully allocated and the status of all nodes
  103. is `green`.
  104. You can monitor progress with the <<cat-health,`_cat/health`>> and
  105. <<cat-recovery,`_cat/recovery`>> APIs:
  106. [source,sh]
  107. --------------------------------------------------
  108. GET _cat/health
  109. GET _cat/recovery
  110. --------------------------------------------------
  111. // CONSOLE
  112. --
  113. . *Restart machine learning jobs.*
  114. +
  115. --
  116. include::open-ml.asciidoc[]
  117. --