cluster_restart.asciidoc 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  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. {stack-ref-68}/upgrading-elastic-stack.html[upgrade to 6.8]
  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. . *Temporarily stop the tasks associated with active {ml} jobs and {dfeeds}.* (Optional)
  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. --
  41. +
  42. --
  43. include::set-paths-tip.asciidoc[]
  44. --
  45. . *Upgrade any plugins.*
  46. +
  47. Use the `elasticsearch-plugin` script to install the upgraded version of each
  48. installed {es} plugin. All plugins must be upgraded when you upgrade
  49. a node.
  50. . If you use {es} {security-features} to define realms, verify that your realm
  51. settings are up-to-date. The format of realm settings changed in version 7.0, in
  52. particular, the placement of the realm type changed. See
  53. <<realm-settings,Realm settings>>.
  54. . *Start each upgraded node.*
  55. +
  56. --
  57. If you have dedicated master nodes, start them first and wait for them to
  58. form a cluster and elect a master before proceeding with your data nodes.
  59. You can check progress by looking at the logs.
  60. If upgrading from a 6.x cluster, you must
  61. <<modules-discovery-bootstrap-cluster,configure cluster bootstrapping>> by
  62. setting the `cluster.initial_master_nodes` setting.
  63. As soon as enough master-eligible nodes have discovered each other, they form a
  64. cluster and elect a master. At that point, you can use
  65. <<cat-health,`_cat/health`>> and <<cat-nodes,`_cat/nodes`>> to monitor nodes
  66. joining the cluster:
  67. [source,sh]
  68. --------------------------------------------------
  69. GET _cat/health
  70. GET _cat/nodes
  71. --------------------------------------------------
  72. // CONSOLE
  73. The `status` column returned by `_cat/health` shows the health of each node
  74. in the cluster: `red`, `yellow`, or `green`.
  75. --
  76. . *Wait for all nodes to join the cluster and report a status of yellow.*
  77. +
  78. --
  79. When a node joins the cluster, it begins to recover any primary shards that
  80. are stored locally. The <<cat-health,`_cat/health`>> API initially reports
  81. a `status` of `red`, indicating that not all primary shards have been allocated.
  82. Once a node recovers its local shards, the cluster `status` switches to `yellow`,
  83. indicating that all primary shards have been recovered, but not all replica
  84. shards are allocated. This is to be expected because you have not yet
  85. reenabled allocation. Delaying the allocation of replicas until all nodes
  86. are `yellow` allows the master to allocate replicas to nodes that
  87. already have local shard copies.
  88. --
  89. . *Reenable allocation.*
  90. +
  91. --
  92. When all nodes have joined the cluster and recovered their primary shards,
  93. reenable allocation by restoring `cluster.routing.allocation.enable` to its
  94. default:
  95. [source,js]
  96. ------------------------------------------------------
  97. PUT _cluster/settings
  98. {
  99. "persistent": {
  100. "cluster.routing.allocation.enable": null
  101. }
  102. }
  103. ------------------------------------------------------
  104. // CONSOLE
  105. Once allocation is reenabled, the cluster starts allocating replica shards to
  106. the data nodes. At this point it is safe to resume indexing and searching,
  107. but your cluster will recover more quickly if you can wait until all primary
  108. and replica shards have been successfully allocated and the status of all nodes
  109. is `green`.
  110. You can monitor progress with the <<cat-health,`_cat/health`>> and
  111. <<cat-recovery,`_cat/recovery`>> APIs:
  112. [source,sh]
  113. --------------------------------------------------
  114. GET _cat/health
  115. GET _cat/recovery
  116. --------------------------------------------------
  117. // CONSOLE
  118. --
  119. . *Restart machine learning jobs.*
  120. +
  121. --
  122. include::open-ml.asciidoc[]
  123. --