ILM Docs: update start/stop documentation (#34787)
adds documentation explaining the different operation modes in the context of starting and stopping ILM.
This commit is contained in:
parent
41eaa586e8
commit
17fe37e5dd
|
@ -63,7 +63,7 @@ include::update-lifecycle-policy.asciidoc[]
|
|||
include::get-index-lifecycle-information.asciidoc[]
|
||||
|
||||
:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/ilm/pause-resume-ilm.asciidoc
|
||||
include::pause-resume-ilm.asciidoc[]
|
||||
include::start-stop-ilm.asciidoc[]
|
||||
|
||||
:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/ilm/apis/ilm-api.asciidoc
|
||||
include::{xes-repo-dir}/ilm/apis/ilm-api.asciidoc[]
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[[pause-resume-ilm]]
|
||||
== Pause and resume {ilm}
|
||||
ILM can be skipped on a per-index basis
|
||||
ILM as a whole can be placed in maintenance mode
|
|
@ -0,0 +1,166 @@
|
|||
[[start-stop-ilm]]
|
||||
== Start And Stop {ilm}
|
||||
|
||||
All indices that are managed by ILM will continue to execute
|
||||
their policies. There may be times when this is not desired on certain
|
||||
indices, or maybe even all the indices in a cluster. For example,
|
||||
maybe there are scheduled maintenance windows when cluster topology
|
||||
changes are desired that may impact running ILM actions. For this reason,
|
||||
ILM has two ways to disable operations.
|
||||
|
||||
Normally, ILM will be running by default.
|
||||
To see the current operating status of ILM, use the <<ilm-get-status,Get Status API>>
|
||||
to see the current state of ILM.
|
||||
|
||||
////
|
||||
[source,js]
|
||||
--------------------------------------------------
|
||||
PUT _ilm/my_policy
|
||||
{
|
||||
"policy": {
|
||||
"phases": {
|
||||
"warm": {
|
||||
"minimum_age": "10d",
|
||||
"actions": {
|
||||
"forcemerge": {
|
||||
"max_num_segments": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"minimum_age": "30d",
|
||||
"actions": {
|
||||
"delete": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PUT my_index
|
||||
{
|
||||
"settings": {
|
||||
"index.lifecycle.name": "my_policy"
|
||||
}
|
||||
}
|
||||
--------------------------------------------------
|
||||
// CONSOLE
|
||||
////
|
||||
|
||||
[source,js]
|
||||
--------------------------------------------------
|
||||
GET _ilm/status
|
||||
--------------------------------------------------
|
||||
// CONSOLE
|
||||
|
||||
If the request does not encounter errors, you receive the following result:
|
||||
|
||||
[source,js]
|
||||
--------------------------------------------------
|
||||
{
|
||||
"operation_mode": "RUNNING"
|
||||
}
|
||||
--------------------------------------------------
|
||||
// CONSOLE
|
||||
// TESTRESPONSE
|
||||
|
||||
The operating modes of ILM:
|
||||
|
||||
|
||||
.ILM Operating Modes
|
||||
|===
|
||||
|Name |Description
|
||||
|RUNNING |Normal operation where all policies are executed as normal
|
||||
|STOPPING|ILM has received a request to stop but is still processing some policies
|
||||
|STOPPED |This represents a state where no policies are executed
|
||||
|===
|
||||
|
||||
=== Stopping ILM
|
||||
|
||||
The ILM service can be paused such that no further steps will be executed
|
||||
using the <<ilm-stop,Stop API>>.
|
||||
|
||||
[source,js]
|
||||
--------------------------------------------------
|
||||
POST _ilm/stop
|
||||
--------------------------------------------------
|
||||
// CONSOLE
|
||||
// TEST[continued]
|
||||
|
||||
When stopped, all further policy actions will be halted. This will
|
||||
be reflected in the Status API
|
||||
|
||||
////
|
||||
[source,js]
|
||||
--------------------------------------------------
|
||||
GET _ilm/status
|
||||
--------------------------------------------------
|
||||
// CONSOLE
|
||||
// TEST[continued]
|
||||
////
|
||||
|
||||
[source,js]
|
||||
--------------------------------------------------
|
||||
{
|
||||
"operation_mode": "STOPPING"
|
||||
}
|
||||
--------------------------------------------------
|
||||
// CONSOLE
|
||||
// TESTRESPONSE
|
||||
|
||||
The ILM service will then, asynchronously, run all policies to a point
|
||||
where it is safe to stop. After ILM verifies that it is safe, it will
|
||||
move to the `STOPPED` mode.
|
||||
|
||||
////
|
||||
[source,js]
|
||||
--------------------------------------------------
|
||||
PUT trigger_ilm_cs_action
|
||||
|
||||
GET _ilm/status
|
||||
--------------------------------------------------
|
||||
// CONSOLE
|
||||
// TEST[continued]
|
||||
////
|
||||
|
||||
[source,js]
|
||||
--------------------------------------------------
|
||||
{
|
||||
"operation_mode": "STOPPED"
|
||||
}
|
||||
--------------------------------------------------
|
||||
// CONSOLE
|
||||
// TESTRESPONSE
|
||||
|
||||
=== Starting ILM
|
||||
|
||||
To start ILM and continue executing policies, use the <<ilm-start, Start API>>.
|
||||
|
||||
|
||||
[source,js]
|
||||
--------------------------------------------------
|
||||
POST _ilm/start
|
||||
--------------------------------------------------
|
||||
// CONSOLE
|
||||
// TEST[continued]
|
||||
|
||||
////
|
||||
[source,js]
|
||||
--------------------------------------------------
|
||||
GET _ilm/status
|
||||
--------------------------------------------------
|
||||
// CONSOLE
|
||||
// TEST[continued]
|
||||
////
|
||||
|
||||
The Start API will send a request to the ILM service to immediately begin
|
||||
normal operations.
|
||||
|
||||
[source,js]
|
||||
--------------------------------------------------
|
||||
{
|
||||
"operation_mode": "RUNNING"
|
||||
}
|
||||
--------------------------------------------------
|
||||
// CONSOLE
|
||||
// TESTRESPONSE
|
Loading…
Reference in New Issue