forked from elastic/built-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupgrading-elasticsearch.html
518 lines (500 loc) · 28.5 KB
/
upgrading-elasticsearch.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="UTF-8">
<title>Upgrade Elasticsearch | Elastic Installation and Upgrade Guide [8.6] | Elastic</title>
<meta class="elastic" name="content" content="Upgrade Elasticsearch | Elastic Installation and Upgrade Guide [8.6]">
<link rel="home" href="index.html" title="Elastic Installation and Upgrade Guide [8.6]"/>
<link rel="up" href="index.html" title="Elastic Installation and Upgrade Guide [8.6]"/>
<link rel="prev" href="upgrading-elastic-stack-on-prem.html" title="Upgrade Elastic on-prem"/>
<link rel="next" href="upgrading-kibana.html" title="Upgrade Kibana"/>
<meta class="elastic" name="product_version" content="8.6"/>
<meta class="elastic" name="product_name" content="Elastic Stack"/>
<meta class="elastic" name="website_area" content="documentation"/>
<meta name="DC.type" content="Learn/Docs/Elastic Stack/Installation and Upgrade/8.6"/>
<meta name="DC.subject" content="Elastic Stack"/>
<meta name="DC.identifier" content="8.6"/>
<meta name="robots" content="noindex,nofollow"/>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://cdn.optimizely.com/js/18132920325.js"></script>
<link rel="apple-touch-icon" sizes="57x57" href="/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-icon-180x180.png">
<link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="/manifest.json">
<meta name="apple-mobile-web-app-title" content="Elastic">
<meta name="application-name" content="Elastic">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/mstile-144x144.png">
<meta name="theme-color" content="#ffffff">
<meta name="naver-site-verification" content="936882c1853b701b3cef3721758d80535413dbfd" />
<meta name="yandex-verification" content="d8a47e95d0972434" />
<meta name="localized" content="true" />
<meta name="st:robots" content="follow,index" />
<meta property="og:image" content="https://static-www.elastic.co/v3/assets/bltefdd0b53724fa2ce/blt280217a63b82a734/6202d3378b1f312528798412/elastic-logo.svg" />
<meta property="og:image:width" content="500" />
<meta property="og:image:height" content="172" />
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<link rel="icon" href="/favicon.ico" type="image/x-icon">
<link rel="apple-touch-icon-precomposed" sizes="64x64" href="/favicon_64x64_16bit.png">
<link rel="apple-touch-icon-precomposed" sizes="32x32" href="/favicon_32x32.png">
<link rel="apple-touch-icon-precomposed" sizes="16x16" href="/favicon_16x16.png">
<!-- Give IE8 a fighting chance -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="/guide/static/styles.css" />
</head>
<!--© 2015-2022 Elasticsearch B.V. -->
<!-- All Elastic documentation is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. -->
<!-- http://creativecommons.org/licenses/by-nc-nd/4.0/ -->
<body>
<!-- Google Tag Manager -->
<script>dataLayer = [];</script><noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-58RLH5" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-58RLH5');</script>
<!-- End Google Tag Manager -->
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-12395217-16"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-12395217-16');
</script>
<!-- Google Tag Manager for GA4 -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-KNJMG2M');</script>
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-KNJMG2M" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager for GA4-->
<div id='elastic-nav' style="display:none;"></div>
<script src='https://www.elastic.co/elastic-nav.js'></script>
<div class="main-container">
<section id="content" >
<div class="content-wrapper">
<section id="guide" lang="en">
<div class="container-fluid">
<div class="row pb-3">
<div class="col-12 order-2 col-md-4 order-md-1 col-lg-3 h-almost-full-md sticky-top-md" id="left_col">
<!-- The TOC is appended here -->
</div>
<div class="col-12 order-1 col-md-8 order-md-2 col-lg-7 order-lg-2 guide-section" id="middle_col">
<!-- start body -->
<div class="page_header">
<strong>IMPORTANT</strong>: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
<a href="../current/index.html">current release documentation</a>.
</div>
<div id="content">
<div class="breadcrumbs">
<span class="breadcrumb-link"><a href="/guide/">Elastic Docs</a></span>
<span class="chevron-right">›</span><span class="breadcrumb-link"><a href="index.html">Elastic Installation and Upgrade Guide [8.6]</a></span>
</div>
<div class="navheader">
<span class="prev">
<a href="upgrading-elastic-stack-on-prem.html">« Upgrade Elastic on-prem</a>
</span>
<span class="next">
<a href="upgrading-kibana.html">Upgrade Kibana »</a>
</span>
</div>
<div class="chapter">
<div class="titlepage"><div><div>
<h1 class="title"><a id="upgrading-elasticsearch"></a>Upgrade Elasticsearch<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/stack-docs/edit/8.6/docs/en/install-upgrade/upgrading-elasticsearch.asciidoc">edit</a></h1>
</div></div></div>
<div class="important admon">
<div class="icon"></div>
<div class="admon_content">
<h3>FIPS Compliance and Java 17</h3>
<p>Elasticsearch 8.6.2 requires Java 17 or later.
There is not yet a FIPS-certified security module for Java 17
that you can use when running Elasticsearch 8.6.2 in FIPS 140-2 mode.
If you run in FIPS 140-2 mode, you will either need to request
an exception from your security organization to upgrade to Elasticsearch 8.6.2,
or remain on Elasticsearch 7.x until Java 17 is certified.
Alternatively, consider using Elasticsearch Service in the FedRAMP-certified GovCloud region.</p>
</div>
</div>
<p>An Elasticsearch cluster can be upgraded one node at
a time so upgrading does not interrupt service. Running multiple versions of
Elasticsearch in the same cluster beyond the duration of an upgrade is
not supported, as shards cannot be replicated from upgraded nodes to nodes
running the older version.</p>
<p>Before you start, <a class="xref" href="upgrading-elastic-stack.html" title="Upgrade to Elastic 8.6.2">take the upgrade preparation
steps</a>. When performing a <a class="xref" href="upgrading-elasticsearch.html#rolling-upgrades" title="Rolling upgrades">rolling upgrade</a>:</p>
<div class="olist orderedlist">
<ol class="orderedlist">
<li class="listitem">
Upgrade nodes that are <span class="strong strong"><strong>NOT</strong></span> <a href="/guide/en/elasticsearch/reference/8.6/modules-node.html#master-node" class="ulink" target="_top">master-eligible</a> first.
You can retrieve a list of these nodes with <code class="literal">GET /_nodes/_all,master:false/_none</code> or by finding all the nodes configured with <code class="literal">node.master: false</code>.
</li>
<li class="listitem">
Upgrade nodes tier-by-tier, starting with the frozen tier.
Complete the upgrade for all nodes in each data tier before moving to the next.
Upgrade the frozen tier, then the cold tier, then the warm tier, and upgrade the hot tier last. This ensures ILM can continue to move data through the tiers during the upgrade. You can get the list of nodes in a specific tier with a <code class="literal">GET /_nodes</code> request,
for example: <code class="literal">GET /_nodes/data_frozen:true/_none</code>.
</li>
<li class="listitem">
Upgrade the master-eligible nodes last. You can retrieve a list
of these nodes with <code class="literal">GET /_nodes/master:true</code>.
</li>
</ol>
</div>
<p>This order ensures that all nodes can join the cluster during the upgrade.
Upgraded nodes can join a cluster with an older master, but older nodes cannot
always join a cluster with a upgraded master.</p>
<p>To upgrade a cluster:</p>
<div class="olist orderedlist">
<ol class="orderedlist">
<li class="listitem">
<p><span class="strong strong"><strong>Disable shard allocation</strong></span>.</p>
<p>When you shut down a data node, the allocation process waits for
<code class="literal">index.unassigned.node_left.delayed_timeout</code> (by default, one minute) before
starting to replicate the shards on that node to other nodes in the cluster,
which can involve a lot of I/O. Since the node is shortly going to be
restarted, this I/O is unnecessary. You can avoid racing the clock by
<a href="/guide/en/elasticsearch/reference/8.6/modules-cluster.html#cluster-routing-allocation-enable" class="ulink" target="_top">disabling allocation</a> of replicas before
shutting down <a href="/guide/en/elasticsearch/reference/8.6/modules-node.html#data-node" class="ulink" target="_top">data nodes</a>:</p>
<div class="pre_wrapper lang-console">
<pre class="programlisting prettyprint lang-console">PUT _cluster/settings
{
"persistent": {
"cluster.routing.allocation.enable": "primaries"
}
}</pre>
</div>
<div class="console_widget" data-snippet="snippets/1.console"></div>
</li>
<li class="listitem">
<p><span class="strong strong"><strong>Stop non-essential indexing and perform a flush.</strong></span> (Optional)</p>
<p>While you can continue indexing during the upgrade, shard recovery
is much faster if you temporarily stop non-essential indexing and perform a
<a href="/guide/en/elasticsearch/reference/8.6/indices-flush.html" class="ulink" target="_top">flush</a>.</p>
<div class="pre_wrapper lang-console">
<pre class="programlisting prettyprint lang-console">POST /_flush</pre>
</div>
<div class="console_widget" data-snippet="snippets/2.console"></div>
</li>
<li class="listitem">
<p><span class="strong strong"><strong>Temporarily stop the tasks associated with active machine learning jobs and datafeeds.</strong></span> (Optional)</p>
<p>It is possible to leave your machine learning jobs running during the upgrade,
but it puts increased load on the cluster. When you shut down a
machine learning node, its jobs automatically move to another node and restore the model
states.</p>
<div class="note admon">
<div class="icon"></div>
<div class="admon_content">
<p>Any machine learning indices created before 7.x must be reindexed
before upgrading, which you can initiate from the <span class="strong strong"><strong>Upgrade Assistant</strong></span> in 7.17.</p>
</div>
</div>
<div class="ulist itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<p>Temporarily halt the tasks associated with your machine learning jobs and datafeeds and
prevent new jobs from opening by using the
<a href="/guide/en/elasticsearch/reference/8.6/ml-set-upgrade-mode.html" class="ulink" target="_top">set upgrade mode API</a>:</p>
<div class="pre_wrapper lang-console">
<pre class="programlisting prettyprint lang-console">POST _ml/set_upgrade_mode?enabled=true</pre>
</div>
<div class="console_widget" data-snippet="snippets/3.console"></div>
<p>When you disable upgrade mode, the jobs resume using the last model
state that was automatically saved. This option avoids the overhead of managing
active jobs during the upgrade and is faster than explicitly stopping datafeeds
and closing jobs.</p>
</li>
<li class="listitem">
<a href="/guide/en/machine-learning/8.6/ml-ad-run-jobs.html#ml-ad-close-job" class="ulink" target="_top">Stop all datafeeds and close all jobs</a>. This option
saves the model state at the time of closure. When you reopen the jobs after the
upgrade, they use the exact same model. However, saving the latest model state
takes longer than using upgrade mode, especially if you have a lot of jobs or
jobs with large model states.
</li>
</ul>
</div>
</li>
<li class="listitem">
<p><a id="upgrade-node"></a> <span class="strong strong"><strong>Shut down a single node</strong></span>.</p>
<div class="ulist itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<p>If you are running Elasticsearch with <code class="literal">systemd</code>:</p>
<div class="pre_wrapper lang-sh">
<pre class="programlisting prettyprint lang-sh">sudo systemctl stop elasticsearch.service</pre>
</div>
</li>
<li class="listitem">
<p>If you are running Elasticsearch with SysV <code class="literal">init</code>:</p>
<div class="pre_wrapper lang-sh">
<pre class="programlisting prettyprint lang-sh">sudo -i service elasticsearch stop</pre>
</div>
</li>
<li class="listitem">
<p>If you are running Elasticsearch as a daemon:</p>
<div class="pre_wrapper lang-sh">
<pre class="programlisting prettyprint lang-sh">kill $(cat pid)</pre>
</div>
</li>
</ul>
</div>
</li>
<li class="listitem">
<p><span class="strong strong"><strong>Upgrade the node you shut down.</strong></span></p>
<p>To upgrade using a <a href="/guide/en/elasticsearch/reference/8.6/deb.html" class="ulink" target="_top">Debian</a> or <a href="/guide/en/elasticsearch/reference/8.6/rpm.html" class="ulink" target="_top">RPM</a> package:</p>
<div class="ulist itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
Use <code class="literal">rpm</code> or <code class="literal">dpkg</code> to install the new package. All files are
installed in the appropriate location for the operating system
and Elasticsearch config files are not overwritten.
</li>
</ul>
</div>
<p>To upgrade using a zip or compressed tarball:</p>
<div class="olist orderedlist">
<ol class="orderedlist">
<li class="listitem">
Extract the zip or tarball to a <span class="strong strong"><strong>new</strong></span> directory. This is critical if you
are not using external <code class="literal">config</code> and <code class="literal">data</code> directories.
</li>
<li class="listitem">
Set the <code class="literal">ES_PATH_CONF</code> environment variable to specify the location of
your external <code class="literal">config</code> directory and <code class="literal">jvm.options</code> file. If you are not
using an external <code class="literal">config</code> directory, copy your old configuration
over to the new installation.
</li>
<li class="listitem">
<p>Set <code class="literal">path.data</code> in <code class="literal">config/elasticsearch.yml</code> to point to your external
data directory. If you are not using an external <code class="literal">data</code> directory, copy
your old data directory over to the new installation.<br></p>
<div class="important admon">
<div class="icon"></div>
<div class="admon_content">
<p>If you use monitoring features, re-use the data directory when you upgrade
Elasticsearch. Monitoring identifies unique Elasticsearch nodes by using the persistent UUID, which
is stored in the data directory.</p>
</div>
</div>
</li>
<li class="listitem">
Set <code class="literal">path.logs</code> in <code class="literal">config/elasticsearch.yml</code> to point to the location
where you want to store your logs. If you do not specify this setting,
logs are stored in the directory you extracted the archive to.
</li>
</ol>
</div>
<div class="tip admon">
<div class="icon"></div>
<div class="admon_content">
<p>When you extract the zip or tarball packages, the <code class="literal">elasticsearch-{bare_version}</code>
directory contains the Elasticsearch <code class="literal">config</code>, <code class="literal">data</code>, and <code class="literal">logs</code> directories.</p>
<p>We recommend moving these directories out of the Elasticsearch directory
so that there is no chance of deleting them when you upgrade Elasticsearch.
To specify the new locations, use the <code class="literal">ES_PATH_CONF</code> environment
variable and the <code class="literal">path.data</code> and <code class="literal">path.logs</code> settings. For more information,
see <a href="/guide/en/elasticsearch/reference/8.6/important-settings.html" class="ulink" target="_top">Important Elasticsearch configuration</a>.</p>
<p>The Debian and RPM packages place these directories in the
appropriate place for each operating system. In production, we recommend
using the deb or rpm package.</p>
</div>
</div>
<p><a id="rolling-upgrades-bootstrapping"></a>Leave <code class="literal">cluster.initial_master_nodes</code> unset when performing a
rolling upgrade. Each upgraded node is joining an existing cluster so there is
no need for <a href="/guide/en/elasticsearch/reference/8.6/modules-discovery-bootstrap-cluster.html" class="ulink" target="_top">cluster bootstrapping</a>.
You must configure <a href="/guide/en/elasticsearch/reference/8.6/important-settings.html#discovery-settings" class="ulink" target="_top">either <code class="literal">discovery.seed_hosts</code> or
<code class="literal">discovery.seed_providers</code></a> on every node.</p>
</li>
<li class="listitem">
<p><span class="strong strong"><strong>Upgrade any plugins.</strong></span></p>
<p>Use the <code class="literal">elasticsearch-plugin</code> script to install the upgraded version of each
installed Elasticsearch plugin. All plugins must be upgraded when you upgrade
a node.</p>
</li>
<li class="listitem">
<p><span class="strong strong"><strong>Start the upgraded node.</strong></span></p>
<p>Start the newly-upgraded node and confirm that it joins the cluster by checking
the log file or by submitting a <code class="literal">_cat/nodes</code> request:</p>
<div class="pre_wrapper lang-console">
<pre class="programlisting prettyprint lang-console">GET _cat/nodes</pre>
</div>
<div class="console_widget" data-snippet="snippets/4.console"></div>
</li>
<li class="listitem">
<p><span class="strong strong"><strong>Reenable shard allocation.</strong></span></p>
<p>For data nodes, once the node has joined the cluster, remove the
<code class="literal">cluster.routing.allocation.enable</code> setting to enable shard allocation and start
using the node:</p>
<div class="pre_wrapper lang-console">
<pre class="programlisting prettyprint lang-console">PUT _cluster/settings
{
"persistent": {
"cluster.routing.allocation.enable": null
}
}</pre>
</div>
<div class="console_widget" data-snippet="snippets/5.console"></div>
</li>
<li class="listitem">
<p><span class="strong strong"><strong>Wait for the node to recover.</strong></span></p>
<p>Before upgrading the next node, wait for the cluster to finish shard allocation.
You can check progress by submitting a <code class="literal">_cat/health</code> request:</p>
<div class="pre_wrapper lang-console">
<pre class="programlisting prettyprint lang-console">GET _cat/health?v=true</pre>
</div>
<div class="console_widget" data-snippet="snippets/6.console"></div>
<p>Wait for the <code class="literal">status</code> column to switch to <code class="literal">green</code>. Once the node is <code class="literal">green</code>, all
primary and replica shards have been allocated.</p>
<div class="important admon">
<div class="icon"></div>
<div class="admon_content">
<p>During a rolling upgrade, primary shards assigned to a node running the new
version cannot have their replicas assigned to a node with the old
version. The new version might have a different data format that is
not understood by the old version.</p>
<p>If it is not possible to assign the replica shards to another node
(there is only one upgraded node in the cluster), the replica
shards remain unassigned and status stays <code class="literal">yellow</code>.</p>
<p>In this case, you can proceed once there are no initializing or relocating shards
(check the <code class="literal">init</code> and <code class="literal">relo</code> columns).</p>
<p>As soon as another node is upgraded, the replicas can be assigned and the
status will change to <code class="literal">green</code>.</p>
</div>
</div>
<p>Shards that were not flushed might take longer to
recover. You can monitor the recovery status of individual shards by
submitting a <code class="literal">_cat/recovery</code> request:</p>
<div class="pre_wrapper lang-console">
<pre class="programlisting prettyprint lang-console">GET _cat/recovery</pre>
</div>
<div class="console_widget" data-snippet="snippets/7.console"></div>
<p>If you stopped indexing, it is safe to resume indexing as soon as
recovery completes.</p>
</li>
<li class="listitem">
<p><span class="strong strong"><strong>Repeat</strong></span>.</p>
<p>When the node has recovered and the cluster is stable, repeat these steps
for each node that needs to be updated. You can monitor the health of the cluster
with a <code class="literal">_cat/health</code> request:</p>
<div class="pre_wrapper lang-console">
<pre class="programlisting prettyprint lang-console">GET /_cat/health?v=true</pre>
</div>
<div class="console_widget" data-snippet="snippets/8.console"></div>
<p>And check which nodes have been upgraded with a <code class="literal">_cat/nodes</code> request:</p>
<div class="pre_wrapper lang-console">
<pre class="programlisting prettyprint lang-console">GET /_cat/nodes?h=ip,name,version&v=true</pre>
</div>
<div class="console_widget" data-snippet="snippets/9.console"></div>
</li>
<li class="listitem">
<p><span class="strong strong"><strong>Restart machine learning jobs.</strong></span></p>
<p>If you temporarily halted the tasks associated with your machine learning jobs,
use the set upgrade mode API to return them to active
states:</p>
<div class="pre_wrapper lang-console">
<pre class="programlisting prettyprint lang-console">POST _ml/set_upgrade_mode?enabled=false</pre>
</div>
<div class="console_widget" data-snippet="snippets/10.console"></div>
<p>If you closed all machine learning jobs before the upgrade, open the jobs and start the
datafeeds from Kibana or with the <a href="/guide/en/elasticsearch/reference/8.6/ml-open-job.html" class="ulink" target="_top">open jobs</a> and
<a href="/guide/en/elasticsearch/reference/8.6/ml-start-datafeed.html" class="ulink" target="_top">start datafeed</a> APIs.</p>
</li>
</ol>
</div>
<h3><a id="rolling-upgrades"></a>Rolling upgrades<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/stack-docs/edit/8.6/docs/en/install-upgrade/upgrading-elasticsearch.asciidoc">edit</a></h3>
<p>During a rolling upgrade, the cluster continues to operate normally. However,
any new functionality is disabled or operates in a backward compatible mode
until all nodes in the cluster are upgraded. New functionality becomes
operational once the upgrade is complete and all nodes are running the new
version. Once that has happened, there’s no way to return to operating in a
backward compatible mode. Nodes running the previous version will not be
allowed to join the fully-updated cluster.</p>
<p>In the unlikely case of a network malfunction during the upgrade process that
isolates all remaining old nodes from the cluster, you must take the old nodes
offline and upgrade them to enable them to join the cluster.</p>
<p>If you stop half or more of the master-eligible nodes all at once during the
upgrade the cluster will become unavailable. You must upgrade and restart
all of the stopped master-eligible nodes to allow the cluster to re-form.
It might also be necessary to upgrade all other nodes running the old version
to enable them to join the re-formed cluster.</p>
<p>Similarly, if you run a testing/development environment with a single master
node it should be upgraded last. Restarting a single master node
forces the cluster to be reformed. The new cluster will initially only have the
upgraded master node and will thus reject the older nodes when they re-join the
cluster. Nodes that have already been upgraded will successfully re-join the
upgraded master.</p>
<h3><a id="archived-settings"></a>Archived settings<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/stack-docs/edit/8.6/docs/en/install-upgrade/upgrading-elasticsearch.asciidoc">edit</a></h3>
<p>If you upgrade an Elasticsearch cluster that uses deprecated cluster or index settings
that are not used in the target version, they are archived. We
recommend you remove any archived settings after upgrading.
For more information, see
<a href="/guide/en/elasticsearch/reference/8.6/archived-settings.html" class="ulink" target="_top">Archived settings</a>.</p>
</div>
<div class="navfooter">
<span class="prev">
<a href="upgrading-elastic-stack-on-prem.html">« Upgrade Elastic on-prem</a>
</span>
<span class="next">
<a href="upgrading-kibana.html">Upgrade Kibana »</a>
</span>
</div>
</div>
<!-- end body -->
</div>
<div class="col-12 order-3 col-lg-2 order-lg-3 h-almost-full-lg sticky-top-lg" id="right_col">
<div id="sticky_content">
<!-- The OTP is appended here -->
<div class="row">
<div class="col-0 col-md-4 col-lg-0" id="bottom_left_col"></div>
<div class="col-12 col-md-8 col-lg-12">
<div id="rtpcontainer">
<div class="mktg-promo" id="most-popular">
<p class="aside-heading">Most Popular</p>
<div class="pb-2">
<p class="media-type">Video</p>
<a href="https://www.elastic.co/webinars/getting-started-elasticsearch?baymax=default&elektra=docs&storm=top-video">
<p class="mb-0">Get Started with Elasticsearch</p>
</a>
</div>
<div class="pb-2">
<p class="media-type">Video</p>
<a href="https://www.elastic.co/webinars/getting-started-kibana?baymax=default&elektra=docs&storm=top-video">
<p class="mb-0">Intro to Kibana</p>
</a>
</div>
<div class="pb-2">
<p class="media-type">Video</p>
<a href="https://www.elastic.co/webinars/introduction-elk-stack?baymax=default&elektra=docs&storm=top-video">
<p class="mb-0">ELK for Logs & Metrics</p>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
<div id='elastic-footer'></div>
<script src='https://www.elastic.co/elastic-footer.js'></script>
<!-- Footer Section end-->
</section>
</div>
<script src="/guide/static/jquery.js"></script>
<script type="text/javascript" src="/guide/static/docs.js"></script>
<script type="text/javascript">
window.initial_state = {}</script>
</body>
</html>