cluster_restart.asciidoc 4.3 KB

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