Skip to content

Commit 7f917eb

Browse files
committed
[DOCS] Updates methods for upgrading machine learning (elastic#38876)
1 parent 176013e commit 7f917eb

File tree

4 files changed

+64
-4
lines changed

4 files changed

+64
-4
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
[testenv="platinum"]
2+
3+
If your {ml} indices were created earlier than the previous major version, they
4+
must be reindexed. In those circumstances, there must be no machine learning
5+
jobs running during the upgrade.
6+
7+
In all other circumstances, there is no requirement to close your {ml} jobs.
8+
There are, however, advantages to doing so. If you choose to leave your jobs
9+
running during the upgrade, they are affected when you stop the {ml} nodes. The
10+
jobs move to another {ml} node and restore the model states. This scenario has
11+
the least disruption to the active {ml} jobs but incurs the highest load on the
12+
cluster.
13+
14+
To close all {ml} jobs before you upgrade, see
15+
{stack-ov}/stopping-ml.html[Stopping {ml}]. This method persists the model
16+
state at the moment of closure, which means that when you open your jobs after
17+
the upgrade, they use the exact same model. This scenario takes the most time,
18+
however, especially if you have many jobs or jobs with large model states.
19+
20+
To temporarily halt the tasks associated with your {ml} jobs and {dfeeds} and
21+
prevent new jobs from opening, use the <<ml-set-upgrade-mode,set upgrade mode API>>:
22+
23+
[source,js]
24+
--------------------------------------------------
25+
POST _ml/set_upgrade_mode?enabled=true
26+
--------------------------------------------------
27+
// CONSOLE
28+
29+
This method does not persist the absolute latest model state, rather it uses the
30+
last model state that was automatically saved. By halting the tasks, you avoid
31+
incurring the cost of managing active jobs during the upgrade and it's quicker
32+
than stopping {dfeeds} and closing jobs.

docs/reference/upgrade/cluster_restart.asciidoc

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,11 @@ recovery.
2626
include::synced-flush.asciidoc[]
2727
--
2828

29-
. *Stop any machine learning jobs that are running.* See
30-
{xpack-ref}/stopping-ml.html[Stopping Machine Learning].
29+
. *Stop any machine learning jobs that are running.*
30+
+
31+
--
32+
include::close-ml.asciidoc[]
33+
--
3134

3235
. *Shutdown all nodes.*
3336
+
@@ -132,3 +135,7 @@ GET _cat/recovery
132135
--
133136

134137
. *Restart machine learning jobs.*
138+
+
139+
--
140+
include::open-ml.asciidoc[]
141+
--
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[testenv="platinum"]
2+
If you closed all {ml} jobs before the upgrade, you must open them. Use {kib} or
3+
the <<ml-open-job,open jobs API>>.
4+
5+
Alternatively, if you temporarily halted the tasks associated with your {ml} jobs,
6+
use the <<ml-set-upgrade-mode,set upgrade mode API>> to return them to active
7+
states:
8+
9+
[source,js]
10+
--------------------------------------------------
11+
POST _ml/set_upgrade_mode?enabled=false
12+
--------------------------------------------------
13+
// CONSOLE

docs/reference/upgrade/rolling_upgrade.asciidoc

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,11 @@ include::synced-flush.asciidoc[]
4343

4444
--
4545

46-
. *Stop any machine learning jobs that are running.* See
47-
{xpack-ref}/stopping-ml.html[Stopping Machine Learning].
46+
. *Stop any machine learning jobs that are running.*
47+
+
48+
--
49+
include::close-ml.asciidoc[]
50+
--
4851

4952
. [[upgrade-node]] *Shut down a single node*.
5053
+
@@ -160,6 +163,11 @@ for each node that needs to be updated.
160163
--
161164

162165
. *Restart machine learning jobs.*
166+
+
167+
--
168+
include::open-ml.asciidoc[]
169+
--
170+
163171

164172
[IMPORTANT]
165173
====================================================

0 commit comments

Comments
 (0)