Skip to content

Commit f93b9f4

Browse files
committed
ILM Docs: update start/stop documentation (#34787)
adds documentation explaining the different operation modes in the context of starting and stopping ILM.
1 parent b2cea99 commit f93b9f4

File tree

3 files changed

+167
-5
lines changed

3 files changed

+167
-5
lines changed

x-pack/docs/en/ilm/index.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ include::update-lifecycle-policy.asciidoc[]
6363
include::get-index-lifecycle-information.asciidoc[]
6464

6565
:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/ilm/pause-resume-ilm.asciidoc
66-
include::pause-resume-ilm.asciidoc[]
66+
include::start-stop-ilm.asciidoc[]
6767

6868
:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/ilm/apis/ilm-api.asciidoc
6969
include::{xes-repo-dir}/ilm/apis/ilm-api.asciidoc[]

x-pack/docs/en/ilm/pause-resume-ilm.asciidoc

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
[[start-stop-ilm]]
2+
== Start And Stop {ilm}
3+
4+
All indices that are managed by ILM will continue to execute
5+
their policies. There may be times when this is not desired on certain
6+
indices, or maybe even all the indices in a cluster. For example,
7+
maybe there are scheduled maintenance windows when cluster topology
8+
changes are desired that may impact running ILM actions. For this reason,
9+
ILM has two ways to disable operations.
10+
11+
Normally, ILM will be running by default.
12+
To see the current operating status of ILM, use the <<ilm-get-status,Get Status API>>
13+
to see the current state of ILM.
14+
15+
////
16+
[source,js]
17+
--------------------------------------------------
18+
PUT _ilm/my_policy
19+
{
20+
"policy": {
21+
"phases": {
22+
"warm": {
23+
"minimum_age": "10d",
24+
"actions": {
25+
"forcemerge": {
26+
"max_num_segments": 1
27+
}
28+
}
29+
},
30+
"delete": {
31+
"minimum_age": "30d",
32+
"actions": {
33+
"delete": {}
34+
}
35+
}
36+
}
37+
}
38+
}
39+
40+
PUT my_index
41+
{
42+
"settings": {
43+
"index.lifecycle.name": "my_policy"
44+
}
45+
}
46+
--------------------------------------------------
47+
// CONSOLE
48+
////
49+
50+
[source,js]
51+
--------------------------------------------------
52+
GET _ilm/status
53+
--------------------------------------------------
54+
// CONSOLE
55+
56+
If the request does not encounter errors, you receive the following result:
57+
58+
[source,js]
59+
--------------------------------------------------
60+
{
61+
"operation_mode": "RUNNING"
62+
}
63+
--------------------------------------------------
64+
// CONSOLE
65+
// TESTRESPONSE
66+
67+
The operating modes of ILM:
68+
69+
70+
.ILM Operating Modes
71+
|===
72+
|Name |Description
73+
|RUNNING |Normal operation where all policies are executed as normal
74+
|STOPPING|ILM has received a request to stop but is still processing some policies
75+
|STOPPED |This represents a state where no policies are executed
76+
|===
77+
78+
=== Stopping ILM
79+
80+
The ILM service can be paused such that no further steps will be executed
81+
using the <<ilm-stop,Stop API>>.
82+
83+
[source,js]
84+
--------------------------------------------------
85+
POST _ilm/stop
86+
--------------------------------------------------
87+
// CONSOLE
88+
// TEST[continued]
89+
90+
When stopped, all further policy actions will be halted. This will
91+
be reflected in the Status API
92+
93+
////
94+
[source,js]
95+
--------------------------------------------------
96+
GET _ilm/status
97+
--------------------------------------------------
98+
// CONSOLE
99+
// TEST[continued]
100+
////
101+
102+
[source,js]
103+
--------------------------------------------------
104+
{
105+
"operation_mode": "STOPPING"
106+
}
107+
--------------------------------------------------
108+
// CONSOLE
109+
// TESTRESPONSE
110+
111+
The ILM service will then, asynchronously, run all policies to a point
112+
where it is safe to stop. After ILM verifies that it is safe, it will
113+
move to the `STOPPED` mode.
114+
115+
////
116+
[source,js]
117+
--------------------------------------------------
118+
PUT trigger_ilm_cs_action
119+
120+
GET _ilm/status
121+
--------------------------------------------------
122+
// CONSOLE
123+
// TEST[continued]
124+
////
125+
126+
[source,js]
127+
--------------------------------------------------
128+
{
129+
"operation_mode": "STOPPED"
130+
}
131+
--------------------------------------------------
132+
// CONSOLE
133+
// TESTRESPONSE
134+
135+
=== Starting ILM
136+
137+
To start ILM and continue executing policies, use the <<ilm-start, Start API>>.
138+
139+
140+
[source,js]
141+
--------------------------------------------------
142+
POST _ilm/start
143+
--------------------------------------------------
144+
// CONSOLE
145+
// TEST[continued]
146+
147+
////
148+
[source,js]
149+
--------------------------------------------------
150+
GET _ilm/status
151+
--------------------------------------------------
152+
// CONSOLE
153+
// TEST[continued]
154+
////
155+
156+
The Start API will send a request to the ILM service to immediately begin
157+
normal operations.
158+
159+
[source,js]
160+
--------------------------------------------------
161+
{
162+
"operation_mode": "RUNNING"
163+
}
164+
--------------------------------------------------
165+
// CONSOLE
166+
// TESTRESPONSE

0 commit comments

Comments
 (0)