cluster_restart.asciidoc 4.1 KB

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